| Package | asgard.display |
| Class | public class TimelineScript |
| Inheritance | TimelineScript CoreObject |
Example :
import asgard.display.TimelineScript ;
var ts:TimelineScript = new TimelineScript( mc , true ) ; // mc a MovieClip in the stage
var start:Function = function()
{
trace("start") ;
}
var pause:Function = function()
{
trace("pause") ;
mc.stop() ;
setTimeout( mc.play , 4000 ) ; // pause 4 s
}
var finish:Function = function()
{
trace("finish") ;
mc.stop() ;
}
ts.put( "begin" , start ) ;
ts.put( "middle" , pause ) ;
ts.put( "finish" , finish ) ;
var click:Function = function( e:MouseEvent ):void
{
mc.play() ;
trace("click") ;
e.target.removeEventListener( MouseEvent.CLICK , click ) ;
mc.buttonMode = false ;
}
mc.useHandCursor = true ;
mc.buttonMode = true ;
mc.addEventListener( MouseEvent.CLICK , click ) ;
| Property | Defined by | ||
|---|---|---|---|
| target : MovieClip [read-only]
(read-only) Indicates the target reference of this iterator.
| TimelineScript | ||
| Method | Defined by | ||
|---|---|---|---|
|
TimelineScript(target:MovieClip, autoStop:Boolean = false)
Creates a new TimelineScript instance.
| TimelineScript | ||
![]() |
Returns the internal
ILogger reference of this ILogable object. | CoreObject | |
![]() |
hashCode():uint
Returns a hashcode value for the object.
| CoreObject | |
|
put(index:*, script:Function):Boolean
Registers a script function in the frame specified by the label or index value passed-in the first argument of the method.
| TimelineScript | ||
|
remove(index:*):void
Unregisters a script function in the frame specified by the label or index value passed-in argument of the method.
| TimelineScript | ||
![]() |
Sets the internal
ILogger reference of this ILogable object. | CoreObject | |
![]() |
toSource(indent:int = 0):String
Returns the string representation the source code of the object.
| CoreObject | |
![]() |
toString():String
Returns the string representation of this instance.
| CoreObject | |
| Method | Defined by | ||
|---|---|---|---|
|
resolve(label:String = null):int
Indicates if the specified passed-in label value is in the MovieClip target.
| TimelineScript | ||
| target | property |
target:MovieClip [read-only](read-only) Indicates the target reference of this iterator.
Implementation public function get target():MovieClip
| TimelineScript | () | constructor |
public function TimelineScript(target:MovieClip, autoStop:Boolean = false)Creates a new TimelineScript instance.
Parameterstarget:MovieClip — The MovieClip reference of this iterator.
|
|
autoStop:Boolean (default = false) — This boolean flag indicates if the specified MovieClip target reference is stopped.
|
| put | () | method |
public function put(index:*, script:Function):BooleanRegisters a script function in the frame specified by the label or index value passed-in the first argument of the method.
Parametersindex:* — A String label name or a uint frame index value.
|
|
script:Function — The Function instruction to register.
|
Boolean — true if the register is success.
|
| remove | () | method |
public function remove(index:*):voidUnregisters a script function in the frame specified by the label or index value passed-in argument of the method.
Parametersindex:* — A String label name or a uint frame index value.
|
| resolve | () | method |
protected function resolve(label:String = null):intIndicates if the specified passed-in label value is in the MovieClip target.
Parameterslabel:String (default = null) |
int |