| Package | graphics.display |
| Class | public class TimelineTransition |
| Inheritance | TimelineTransition CoreTransition CoreAction Task Object |
Example :
package examples
{
import graphics.display.TimelineTransition;
import system.events.ActionEvent;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.display.StageScaleMode;
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;
public dynamic class TimelineTransition01Example extends Sprite
{
public function TimelineTransition01Example()
{
// stage
stage.scaleMode = StageScaleMode.NO_SCALE ;
stage.addEventListener( KeyboardEvent.KEY_DOWN , keyDown ) ;
// MovieClip target with the three frame labels :
// "start", "middle" and "finish"
movieclip = getChildByName("mc") as MovieClip ;
// timeline script
timeline = new TimelineTransition( movieclip ) ;
timeline.defaultIndex = 4 ; // by default stop the MovieClip in the frame index 4.
timeline.addEventListener( ActionEvent.FINISH , finish ) ;
timeline.addEventListener( ActionEvent.RESUME , resume ) ;
timeline.addEventListener( ActionEvent.START , start ) ;
}
protected var movieclip:MovieClip ;
protected var timeline:TimelineTransition ;
protected function finish( e:ActionEvent ):void
{
trace( "finish" ) ;
}
protected function keyDown( e:KeyboardEvent ):void
{
var code:uint = e.keyCode ;
switch( code )
{
case Keyboard.UP :
{
timeline.startIndex = "middle" ;
timeline.finishIndex = "finish" ;
timeline.run() ;
break ;
}
case Keyboard.DOWN :
{
timeline.startIndex = "start" ;
timeline.finishIndex = "middle" ;
timeline.run() ;
break ;
}
case Keyboard.SPACE :
{
timeline.startIndex = "start" ;
timeline.finishIndex = "finish" ;
timeline.run() ;
break ;
}
case Keyboard.LEFT :
{
if ( timeline.running )
{
timeline.stop() ;
}
else if ( timeline.stopped )
{
timeline.resume() ;
}
else
{
timeline.start() ;
}
break ;
}
}
}
protected function resume( e:ActionEvent ):void
{
trace( "resume" ) ;
}
protected function start( e:ActionEvent ):void
{
trace( "start" ) ;
}
}
}
| Property | Defined By | ||
|---|---|---|---|
![]() | changeIt : Signaler
This signal emit when the notifyChanged method is invoked. | CoreAction | |
![]() | clearIt : Signaler
This signal emit when the notifyCleared method is invoked. | CoreAction | |
| currentLoop : uint [read-only]
Indicates the current countdown loop value. | TimelineTransition | ||
| defaultIndex : *
This index defines the default frame to stop the timeline of the MovieClip target. | TimelineTransition | ||
| finishIndex : *
Indicates the finish index. | TimelineTransition | ||
![]() | finishIt : Signaler
This signal emit when the notifyFinished method is invoked. | Task | |
| frameScripts : Array
An optional Array of framescripts to add in the MovieClip target during the transition. | TimelineTransition | ||
![]() | id : *
Indicates the id value of this object. | CoreTransition | |
![]() | infoIt : Signaler
This signal emit when the notifyInfo method is invoked. | CoreAction | |
![]() | logger : Logger
Determinates the internal Logger reference of this Loggable object. | Task | |
![]() | looping : Boolean
The flag to determinate if the Action object is looped. | CoreAction | |
![]() | loopIt : Signaler
This signal emit when the notifyLooped method is invoked. | CoreAction | |
| numLoop : uint
Specifies the number of the times the presentation should loop during playback. | TimelineTransition | ||
![]() | pauseIt : Signaler
This signal emit when the notifyPause method is invoked. | CoreAction | |
![]() | phase : String [read-only]
The current phase of the action. | Task | |
![]() | progressIt : Signaler
This signal emit when the notifyProgress method is invoked. | CoreAction | |
![]() | resumeIt : Signaler
This signal emit when the notifyResumed method is invoked. | CoreAction | |
![]() | running : Boolean [read-only]
Indicates true if the process is in progress. | Task | |
| startIndex : *
Indicates the start index. | TimelineTransition | ||
![]() | startIt : Signaler
This signal emit when the notifyStarted method is invoked. | Task | |
![]() | stopIt : Signaler
This signal emit when the notifyStopped method is invoked. | CoreAction | |
| stopped : Boolean [read-only]
Indicates if the process is stopped. | TimelineTransition | ||
| target : MovieClip
The MovieClip target reference. | TimelineTransition | ||
![]() | timeoutIt : Signaler
This signal emit when the notifyTimeOut method is invoked. | CoreAction | |
| verbose : Boolean
Enables the verbose mode of this object. | TimelineTransition | ||
| Method | Defined By | ||
|---|---|---|---|
TimelineTransition(target:MovieClip = null, startIndex:* = null, finishIndex:* = null, looping:Boolean = false, numLoop:uint = 0, defaultIndex:* = 1, frameScripts:Array = null)
Creates a new TimelineTransition instance. | TimelineTransition | ||
clone():* [override]
Returns a shallow copy of this object. | TimelineTransition | ||
![]() | equals(o:*):Boolean
Compares the specified object with this object for equality. | CoreTransition | |
![]() | isLocked():Boolean
Returns true if the object is locked. | Task | |
![]() | lock():void
Locks the object. | Task | |
![]() | notifyChanged():void
Notify when the process is changed. | CoreAction | |
![]() | notifyCleared():void
Notify when the process is cleared. | CoreAction | |
![]() | notifyFinished():void
Notify an ActionEvent when the process is finished. | Task | |
![]() | notifyInfo(info:*):void
Notify a specific information when the process is changed. | CoreAction | |
![]() | notifyLooped():void
Notify when the process is looped. | CoreAction | |
![]() | notifyPaused():void
Notify when the process is paused. | CoreAction | |
![]() | notifyProgress():void
Notify when the process is in progress. | CoreAction | |
![]() | notifyResumed():void
Notify when the process is resumed. | CoreAction | |
![]() | notifyStarted():void
Notify an ActionEvent when the process is started. | Task | |
![]() | notifyStopped():void
Notify when the process is stopped. | CoreAction | |
![]() | notifyTimeOut():void
Notify when the process is out of time. | CoreAction | |
resume():void [override]
Restart the process if the process is stopped. | TimelineTransition | ||
run(... arguments):void [override]
Run the process. | TimelineTransition | ||
start():void [override]
Starts the transition. | TimelineTransition | ||
stop():void [override]
Stops the transition. | TimelineTransition | ||
![]() | unlock():void
Unlocks the display. | Task | |
| Method | Defined By | ||
|---|---|---|---|
finish():void
Invoked when a specific frame is find in the timeline by the timeline inspector. | TimelineTransition | ||
playback():void
Starts the playback of the target with the specified start index. | TimelineTransition | ||
![]() | setRunning(b:Boolean):void
Changes the running property value. | Task | |
| currentLoop | property |
currentLoop:uint [read-only] Indicates the current countdown loop value.
public function get currentLoop():uint| defaultIndex | property |
defaultIndex:*This index defines the default frame to stop the timeline of the MovieClip target.
public function get defaultIndex():* public function set defaultIndex(value:any):void| finishIndex | property |
finishIndex:*Indicates the finish index.
public function get finishIndex():* public function set finishIndex(value:any):void| frameScripts | property |
public var frameScripts:ArrayAn optional Array of framescripts to add in the MovieClip target during the transition.
| numLoop | property |
public var numLoop:uintSpecifies the number of the times the presentation should loop during playback.
| startIndex | property |
startIndex:*Indicates the start index.
public function get startIndex():* public function set startIndex(value:any):void| stopped | property |
stopped:Boolean [read-only] Indicates if the process is stopped. You can resume a stopped transition.
public function get stopped():Boolean| target | property |
target:MovieClipThe MovieClip target reference.
public function get target():MovieClip public function set target(value:MovieClip):void| verbose | property |
public var verbose:BooleanEnables the verbose mode of this object.
| TimelineTransition | () | Constructor |
public function TimelineTransition(target:MovieClip = null, startIndex:* = null, finishIndex:* = null, looping:Boolean = false, numLoop:uint = 0, defaultIndex:* = 1, frameScripts:Array = null)Creates a new TimelineTransition instance.
Parameterstarget:MovieClip (default = null) — The MovieClip target reference.
| |
startIndex:* (default = null) — The start index.
| |
finishIndex:* (default = null) — The finish index.
| |
looping:Boolean (default = false) — Specifies whether playback of the clip should continue, or loop (default false).
| |
numLoop:uint (default = 0) — Specifies the number of the times the presentation should loop during playback.
| |
defaultIndex:* (default = 1) — This index defines the default frame to stop the timeline of the MovieClip target.
| |
frameScripts:Array (default = null) — The optional Array of frame scripts.
|
| clone | () | method |
override public function clone():*Returns a shallow copy of this object.
Returns* — a shallow copy of this object.
|
| finish | () | method |
protected function finish():voidInvoked when a specific frame is find in the timeline by the timeline inspector.
| playback | () | method |
protected function playback():voidStarts the playback of the target with the specified start index.
| resume | () | method |
override public function resume():voidRestart the process if the process is stopped.
| run | () | method |
override public function run(... arguments):voidRun the process.
Parameters
... arguments |
| start | () | method |
override public function start():voidStarts the transition.
| stop | () | method |
override public function stop():voidStops the transition.