new Timeline(target, keyFrameObj)
Parameters:
Name | Type | Description |
---|---|---|
target | Object | Any object that will be changed its properties by the animation. Usually the object is a display object. |
keyFrameObj | Object | An object that takes a frame index as a key and a group of properties as a value |
Methods
-
executeKeyFrame(index)
-
Sets values of the propeties at the specified frame index.
Parameters:
Name Type Description index int A frame index -
getTotalFrames()
-
Returns the nubmer of total frames. return {Number} The number of total frames
-
setFps(fps)
-
Sets a FPS.
Parameters:
Name Type Description fps Number FPS -
setTotalFrames(totalFrames)
-
Sets a number of total frames.
Parameters:
Name Type Description totalFrames int A number of total frames -
update(index, elapsed)
-
A method that is supposed to be called in every ENTER_FRAME. It changes the values of the properties depending on the elapsed time.
Parameters:
Name Type Description index int A frame index elapsed Number An elapsed time