A SERVICE OF

logo

DesktopX 2.4 Developer’s Guide
_____________________________________________________________________________
_____________________________________________________________________________
Page 22
3.2 Animating Objects
Whilst everything you learnt in the previous section was great, there's nothing that catches the
eye like movement, so DesktopX makes it easy for you to add animation to your objects.
The ‘animation’ tab is where you can define how your object animates.
The first thing to explain is that there are the two different types of animation that DesktopX can
do.
A 'Static animation' is the most simple animation option. This simply changes the level of
transparency rather than the image itself.
Slightly more complex is a standard animation with different images over time.
Static Animations
We will start with a 'Static animation'. To start with, set a number of frames. A frame is an
individual part of an animation, so the higher the number of states the more different 'images' an
animation has. Once you set this value higher than '1', the 'Interval' is enabled. This is how long
each part of the animation lasts in milliseconds. The higher the value the longer the animation
takes. For example, a 5 frame image with an interval of 50ms will take 250ms (1/4 of a second).
You also need to check the 'Static animation' checkbox so that DesktopX knows not to expect an
animated image, just to vary transparency.
If you check the 'Loop' box then the animation will be repeated as long as the object is in that
state. Normally if the state changes then the animation will play through to the end, but if you
check the 'Interruptible' box then to state will change immediately without playing to the end.
After that you simply need to set the direction in which the animation will fun by selecting one
of the 4 options available.
If you are looping the animation it will probably make sense to choose one of the bottom pair as
this will lead to a nice smooth pulsing transparency effect.
The final thing that you need to do is specify the change in transparency. This is where you get
to use the third option on the 'Transparency' tab. Here you specify how the transparency varies in
one cycle of the animation. This will then be impacted by the animation style you chose and
whether you chose to 'Loop' the animation.
Try experimenting with these options and see how they change the appearance of the object.