Timeline
Add a timeline within the movie timeline. This allows animations to run independently from the main timeline. It also allows objects and shapes to be grouped together.
Timelines can be added to the editor and animated as normal. In this example a timeline object is used to group 4 items together.
Properties
Auto Play
• The movie will automatically start playing.
|
Loop
• When the movie has finished playing it will start again.
|
Speed
• The speed of the timeline. The default value is 1, or 12 key frames per seconds. 2 is double speed, or 24 key frames per second. 0.5 is half speed. 0 is stopped. -1 is reverse.
|
A timeline can be set to automatically play and loop. It can also be controlled using script to start and stop it if need be. However, timelines cannot contain any Javascript.
Script
Timeline Play
• Play the timeline.
TimelinePlay("Script ID");
|
Timeline Stop
• Stop the timeline.
TimelineStop("Script ID");
|
Timeline Goto And Play
• Play the timeline from a specific frame. For example, GotoAndPlay("Timeline1",100).
TimelineGotoAndPlay("Script ID",Frame:Number);
|
Timeline Goto And Stop
• Go to a specific frame of the movie and then stop. For example, GotoAndStop("Timeline1",100).
TimelineGotoAndStop("Script ID",Frame:Number);
|
Timeline Play Clip
• Play a clip of the timeline from start to end. For example, PlayClip("Timeline1",100,200).
TimelinePlayClip("Script ID",Start:Number,End:Number);
|
Timeline Play Loop
• Play a clip of the timeline from start to end continuously. For example, TimelinePlayLoop("Timeline1",100,200).
TimelinePlayLoop("Script ID",Start:Number,End:Number);
|
Timeline Play Then Loop
• Play a clip of the timeline from start to end. Then continuously play a loop. For example, TimelinePlayThenLoop("Timeline1",100,180,200) This will start on frame 100, play until frame 200 then loop back to frame 180. The start frame of the loop could be before the start frame.
TimelinePlayLoop("Script ID",Start:Number,StartLoop:Number,End:Number);
|
Timeline Pause
• Pause the timeline. This is like TimelineStop() except it does not break out of any clips or loops it may be in.
TimelinePause("Script ID");
|
Timeline Resume
• Resume the timeline. This is like TimelinePlay() except it does not break out of any clips or loops it may be in.
TimelineResume("Script ID");
|
Timeline Get Time
• Returns the current time of the timeline. This is a floating point value.
TimelineGetTime("Script ID");
|
Timeline Set Time
• Set the current time of the timeline.
TimelineSetTime("Script ID",Frame:Number);
|
Timeline Get Frame
• Returns the current frame of the timeline. This is similar to the time except it is a whole number.
TimelineGetFrame("Script ID");
|
Timeline Set Frame
• Set the current frame of the timeline. This is like setting the time but it can only be a whole number.
TimelineSetFrame("Script ID",Frame:Number);
|
Timeline Get Speed
• Get the speed of the timeline. The default value is 1. 2 is double speed. 0.5 is half speed. 0 is stopped. -1 is reverse. When in reverse the start frame of any loops or clips should be higher than the end frame.
TimelineGetSpeed("Script ID");
|
Timeline Set Speed
• Set the speed of the timeline. The default value is 1. 2 is double speed. 0.5 is half speed. 0 is stopped. -1 is reverse. When in reverse the start frame of any loops or clips should be higher than the end frame.
TimelineSetSpeed("Script ID",Speed:Number);
|