Slide Animation

The slide animation is used to change the x and y position of an element over a specific time amount. There is one slide animation that can be used on elements included in AwesomeVisuals. Just reference an element and call the one function. Leaving the optional parameters false will assume certain defaults.

$Div("myDiv").Slide(200, 200);
// is the same as
$Div("myDiv").Slide(200, 200, Speed.Normal, Smoothness.Normal);
Slide(Number x, Number y, Number speed, Number frames, EventHandler onFinish) Slides the element to the x and y position

Defaults and Enumerations

For speed and frames parameters, you can use the predefined enumerations Speed and Smoothness:

Speed.Slow

Speed.Normal

Speed.Fast

Speed.Faster

Speed.Fastest

Smoothness.Normal

Smoothness.Smooth

Smoothness.Smoother

Smoothness.Smoothest

The speed parameter indicates the amount of time the animation should take in milliseconds. A smaller value means a faster animation. The frames indicates the number of changes that will happen during the animations. Higher frames means a smoother animation, but too small of a number can cause slow downs and actually reverse the speed of animation.

Last edited Jun 12, 2011 at 7:29 PM by dahrkdaiz, version 2

Comments

No comments yet.