This project is read-only.

ScaleAnimation Reference

ScaleAnimation Client Reference

The ScaleAnimation scales the size of the target element by the given scaleFactor (i.e. a scaleFactor of .5 will shrink it in half and a scaleFactor of 2.0 will double it). If scaleFont is true, the size of the font will also scale with the element. If center is true, then the element's center will not move as it is scaled. It is important to note that the target must be positioned (i.e. absolutely) so that setting its top/left properties will change its location in order for center to have an effect.

ScaleAnimation Client Properties

Name Description
center Whether the target should stay centered while scaling
duration Length of the animation in seconds. The default is 1.
events The collection of event handlers for this behavior. This property should only be used by derived behaviors and should not be publicly called by other code.
fontUnit Unit of the font, which is only used if scaleFont is true. The default value is 'pt'.
fps Number of steps per second. The default is 25.
isActive true if animation is active, false if not.
isPlaying true if animation is playing, false if not.
percentComplete Percentage of the animation already played.
scaleFactor The amount to scale the target (a scaleFactor of .5 will shrink it in half and a scaleFactor of 2.0 will double it). The default value is 1, which does no scaling.
scaleFont Whether the font should be scaled along with the size
unit Length unit for the size of the target. The default value is 'px'.

ScaleAnimation Client Methods

Name Description
dispose Dispose the animation
getAnimatedValue Get the amount to scale the target
interpolate The interpolate function is used to find the appropriate value between starting and ending values given the current percentage.
onEnd Wipe the cached values after the animation completes
onStart Cache the initial size because it will be used to determine how much to scale the element at each step of the animation
onStep The onStep method is called repeatedly to progress the animation through each frame
pause Pause the animation if it is playing. Calling play will resume where the animation left off.
play Play the animation from the beginning or where it was left off when paused.
play Create an animation, play it immediately, and dispose it when finished.
raiseEnded Raise the ended event
raisePropertyChanged Raises a change notification event.
raiseStarted Raise the started event
raiseStep Raise the step event
setOwner Make this animation the child of another animation
setValue Scale the target by the given percentage
stop Stop playing the animation.

ScaleAnimation Client Events

Name Description
ended Adds an event handler for the ended event.
started Adds an event handler for the started event.
step Adds an event handler for the step event.

Last edited Jun 11, 2014 at 10:22 AM by prasannaranib, version 1