Package | com.catalystapps.gaf.display |
Class | public dynamic class GAFMovieClip |
Inheritance | GAFMovieClip ![]() |
Implements | starling.animation.IAnimatable, com.catalystapps.gaf.display.IGAFDisplayObject, com.catalystapps.gaf.display.IMaxSize |
play
, stop
, gotoAndPlay,
etc.)
and some more like loop
, nPlay
, setSequence
that helps manage playback
Property | Defined By | ||
---|---|---|---|
currentFrame : uint [read-only]
Specifies the number of the frame in which the playhead is located in the timeline of the GAFMovieClip instance. | GAFMovieClip | ||
currentSequence : String [read-only]
Returns id of the sequence where animation is right now. | GAFMovieClip | ||
fps : Number
Sets an individual frame rate for GAFMovieClip. | GAFMovieClip | ||
inPlay : Boolean [read-only]
Indicates whether GAFMovieClip instance already in play
| GAFMovieClip | ||
loop : Boolean
Indicates whether GAFMovieClip instance continue playing from start frame after playback reached animation end
| GAFMovieClip | ||
reverse : Boolean
If true animation will be playing in reverse mode
| GAFMovieClip | ||
skipFrames : Boolean
Indicates whether GAFMovieClip instance should skip frames when application fps drops down or play every frame not depending on application fps. | GAFMovieClip | ||
smoothing : String
The smoothing filter that is used for the texture. | GAFMovieClip | ||
totalFrames : uint [read-only]
The total number of frames in the GAFMovieClip instance. | GAFMovieClip | ||
useClipping : Boolean
if set true - GAFMivieclip will be clipped with flash stage dimensions
| GAFMovieClip |
Method | Defined By | ||
---|---|---|---|
GAFMovieClip(gafTimeline:GAFTimeline, fps:int = -1, addToJuggler:Boolean = true)
Creates a new GAFMovieClip instance. | GAFMovieClip | ||
clearSequence():void
Clear playing sequence. | GAFMovieClip | ||
Creates a new instance of GAFMovieClip. | GAFMovieClip | ||
dispose():void [override]
Disposes all resources of the display object instance. | GAFMovieClip | ||
disposeWithTextures():void Deprecated Since 5.0: Please Use com.catalystapps.gaf.data.GAFBundle.dispose()
Disposes GAFMovieClip with config and all textures that was loaded with gaf file. | GAFMovieClip | ||
getChildByName(name:String):DisplayObject [override] Returns a child object with a certain name (non-recursively). | GAFMovieClip | ||
gotoAndPlay(frame:*):void
Starts playing animation at the specified frame. | GAFMovieClip | ||
gotoAndStop(frame:*):void
Brings the playhead to the specified frame of the movie clip and stops it there. | GAFMovieClip | ||
hideMaskByID(id:String):void
Hides mask display object that previously has been shown using showMaskByID method. | GAFMovieClip | ||
loopAll(loop:Boolean):void
Set the loop value to the GAFMovieClip instance and for the all children. | GAFMovieClip | ||
play(applyToAllChildren:Boolean = false):void
Moves the playhead in the timeline of the movie clip play() or play(false). | GAFMovieClip | ||
removeChildAt(index:int, dispose:Boolean = false):DisplayObject [override] Removes a child at a certain index. | GAFMovieClip | ||
setSequence(id:String, play:Boolean = true):CAnimationSequence
Set sequence to play
| GAFMovieClip | ||
showBounds(value:Boolean):void Shows bounds of a whole animation with a pivot point. | GAFMovieClip | ||
showMaskByID(id:String):void
Shows mask display object that exists with the specified ID. | GAFMovieClip | ||
stop(applyToAllChildren:Boolean = false):void
Stops the playhead in the movie clip stop() or stop(false). | GAFMovieClip |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched whenever the movie has displayed its last frame. | GAFMovieClip | |||
Dispatched when playhead reached end frame of sequence | GAFMovieClip | |||
Dispatched when playhead reached first frame of sequence | GAFMovieClip |
Constant | Defined By | ||
---|---|---|---|
EVENT_TYPE_SEQUENCE_END : String = typeSequenceEnd [static] | GAFMovieClip | ||
EVENT_TYPE_SEQUENCE_START : String = typeSequenceStart [static] | GAFMovieClip |
currentFrame | property |
currentFrame:uint
[read-only] Specifies the number of the frame in which the playhead is located in the timeline of the GAFMovieClip instance. First frame is "1"
public function get currentFrame():uint
currentSequence | property |
currentSequence:String
[read-only]
Returns id of the sequence where animation is right now. If there is no sequences - returns null
.
public function get currentSequence():String
fps | property |
fps:Number
Sets an individual frame rate for GAFMovieClip
. If this value is lower than stage fps - the GAFMovieClip
will skip frames.
public function get fps():Number
public function set fps(value:Number):void
inPlay | property |
inPlay:Boolean
[read-only] Indicates whether GAFMovieClip instance already in play
public function get inPlay():Boolean
loop | property |
loop:Boolean
Indicates whether GAFMovieClip instance continue playing from start frame after playback reached animation end
public function get loop():Boolean
public function set loop(value:Boolean):void
reverse | property |
reverse:Boolean
If true
animation will be playing in reverse mode
public function get reverse():Boolean
public function set reverse(value:Boolean):void
skipFrames | property |
skipFrames:Boolean
Indicates whether GAFMovieClip instance should skip frames when application fps drops down or play every frame not depending on application fps. Value false will force GAFMovieClip to play each frame not depending on application fps (the same behavior as in regular Flash Movie Clip). Value true will force GAFMovieClip to play animation "in time". And when application fps drops down it will start skipping frames (default behavior).
public function get skipFrames():Boolean
public function set skipFrames(value:Boolean):void
smoothing | property |
smoothing:String
The smoothing filter that is used for the texture. Possible values are TextureSmoothing.BILINEAR, TextureSmoothing.NONE, TextureSmoothing.TRILINEAR
public function get smoothing():String
public function set smoothing(value:String):void
totalFrames | property |
totalFrames:uint
[read-only] The total number of frames in the GAFMovieClip instance.
public function get totalFrames():uint
useClipping | property |
useClipping:Boolean
if set true
- GAFMivieclip
will be clipped with flash stage dimensions
public function get useClipping():Boolean
public function set useClipping(value:Boolean):void
GAFMovieClip | () | Constructor |
public function GAFMovieClip(gafTimeline:GAFTimeline, fps:int = -1, addToJuggler:Boolean = true)
Creates a new GAFMovieClip instance.
ParametersgafTimeline:GAFTimeline — GAFTimeline from what GAFMovieClip will be created
| |
fps:int (default = -1 ) — defines the frame rate of the movie clip. If not set - the stage config frame rate will be used instead.
| |
addToJuggler:Boolean (default = true ) — if true - GAFMovieClip will be added to Starling.juggler
and removed automatically on dispose
|
clearSequence | () | method |
public function clearSequence():void
Clear playing sequence. If animation already in play just continue playing without sequence limitation
copy | () | method |
dispose | () | method |
override public function dispose():void
Disposes all resources of the display object instance. Note: this method won't delete used texture atlases from GPU memory.
To delete texture atlases from GPU memory use unloadFromVideoMemory()
method for GAFTimeline
instance
from what GAFMovieClip
was instantiated.
Call this method every time before delete no longer required instance! Otherwise GPU memory leak may occur!
disposeWithTextures | () | method |
public function disposeWithTextures():void
Disposes GAFMovieClip with config and all textures that was loaded with gaf file. Do not call this method if you have another GAFMovieClips that made from the same config or even loaded from the same gaf file.
getChildByName | () | method |
override public function getChildByName(name:String):DisplayObject
Returns a child object with a certain name (non-recursively).
Parameters
name:String |
DisplayObject |
gotoAndPlay | () | method |
public function gotoAndPlay(frame:*):void
Starts playing animation at the specified frame. First frame is "1"
Parameters
frame:* — A number representing the frame number, or a string representing the label of the frame, to which the playhead is sent.
|
gotoAndStop | () | method |
public function gotoAndStop(frame:*):void
Brings the playhead to the specified frame of the movie clip and stops it there. First frame is "1"
Parameters
frame:* — A number representing the frame number, or a string representing the label of the frame, to which the playhead is sent.
|
hideMaskByID | () | method |
public function hideMaskByID(id:String):void
Hides mask display object that previously has been shown using showMaskByID
method.
Used for debug purposes only!
Parameters
id:String — Mask ID
|
loopAll | () | method |
public function loopAll(loop:Boolean):void
Set the loop
value to the GAFMovieClip instance and for the all children.
Parameters
loop:Boolean |
play | () | method |
public function play(applyToAllChildren:Boolean = false):void
Moves the playhead in the timeline of the movie clip play()
or play(false)
.
Or moves the playhead in the timeline of the movie clip and all child movie clips play(true)
.
Use play(true)
in case when animation contain nested timelines for correct playback right after
initialization (like you see in the original swf file).
Parameters
applyToAllChildren:Boolean (default = false ) — Specifies whether playhead should be moved in the timeline of the movie clip
(false ) or also in the timelines of all child movie clips (true ).
|
removeChildAt | () | method |
override public function removeChildAt(index:int, dispose:Boolean = false):DisplayObject
Removes a child at a certain index. The index positions of any display objects above the child are decreased by 1. If requested, the child will be disposed right away.
Parameters
index:int | |
dispose:Boolean (default = false )
|
DisplayObject |
setSequence | () | method |
public function setSequence(id:String, play:Boolean = true):CAnimationSequence
Set sequence to play
Parameters
id:String — Sequence ID
| |
play:Boolean (default = true ) — Play or not immediately. true - starts playing from sequence start frame. false - go to sequence start frame and stop
|
CAnimationSequence — sequence to play
|
showBounds | () | method |
public function showBounds(value:Boolean):void
Shows bounds of a whole animation with a pivot point. Used for debug purposes.
Parameters
value:Boolean |
showMaskByID | () | method |
public function showMaskByID(id:String):void
Shows mask display object that exists with the specified ID. Used for debug purposes only!
Parameters
id:String — Mask ID
|
stop | () | method |
public function stop(applyToAllChildren:Boolean = false):void
Stops the playhead in the movie clip stop()
or stop(false)
.
Or stops the playhead in the movie clip and in all child movie clips stop(true)
.
Use stop(true)
in case when animation contain nested timelines for full stop the
playhead in the movie clip and in all child movie clips.
Parameters
applyToAllChildren:Boolean (default = false ) — Specifies whether playhead should be stopped in the timeline of the
movie clip (false ) or also in the timelines of all child movie clips (true )
|
complete | Event |
starling.events.Event
Dispatched whenever the movie has displayed its last frame.
typeSequenceEnd | Event |
starling.events.Event
Dispatched when playhead reached end frame of sequence
typeSequenceStart | Event |
starling.events.Event
Dispatched when playhead reached first frame of sequence
EVENT_TYPE_SEQUENCE_END | Constant |
public static const EVENT_TYPE_SEQUENCE_END:String = typeSequenceEnd
EVENT_TYPE_SEQUENCE_START | Constant |
public static const EVENT_TYPE_SEQUENCE_START:String = typeSequenceStart