This project is read-only.

ColorAnimation Reference

ColorAnimation Client Reference

The ColorAnimation transitions the value of the property between two colors (although it does ignore the alpha channel). The colors must be 7-character hex strings (like #246ACF).

ColorAnimation Client Properties

Name Description
duration Length of the animation in seconds. The default is 1.
endValue End of the range of values
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.
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.
property Property of the target element to set when animating
propertyKey Optional key of the property to be set (which indicates the value propertypropertyKey, like style'backgroundColor'). Note that for the style property, the key must be in a JavaScript friendly format (i.e. backgroundColor instead of background-color).
startValue Start of the range of values

ColorAnimation Client Methods

Name Description
dispose Dispose the animation
getAnimatedValue Get the interpolated color values
getRGB Convert the color to an RGB triplet
getValue Get the current value from the property
interpolate The interpolate function is used to find the appropriate value between starting and ending values given the current percentage.
onEnd The onEnd method is called just after the animation is played each time.
onStart Determine which dimensions of color will be animated
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 Set the current value of the property
stop Stop playing the animation.
toColor Convert an RBG triplet into a 7-character hex string (like #246ACF)

ColorAnimation 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 6, 2014 at 10:14 AM by prasannaranib, version 1