Packagecom.catalystapps.gaf.display
Classpublic dynamic class GAFMovieClip
InheritanceGAFMovieClip Inheritance starling.display.Sprite
Implements starling.animation.IAnimatable, com.catalystapps.gaf.display.IGAFDisplayObject, com.catalystapps.gaf.display.IMaxSize

GAFMovieClip represents animation display object that is ready to be used in Starling display list. It has all controls for animation familiar from standard MovieClip (play, stop, gotoAndPlay, etc.) and some more like loop, nPlay, setSequence that helps manage playback



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined By
  
GAFMovieClip(gafTimeline:GAFTimeline, fps:int = -1, addToJuggler:Boolean = true)
Creates a new GAFMovieClip instance.
GAFMovieClip
  
Clear playing sequence.
GAFMovieClip
  
Creates a new instance of GAFMovieClip.
GAFMovieClip
  
dispose():void
[override] Disposes all resources of the display object instance.
GAFMovieClip
  
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
Events
 Event Summary Defined By
  Dispatched whenever the movie has displayed its last frame.GAFMovieClip
  Dispatched when playhead reached end frame of sequenceGAFMovieClip
  Dispatched when playhead reached first frame of sequenceGAFMovieClip
Public Constants
 ConstantDefined By
  EVENT_TYPE_SEQUENCE_END : String = typeSequenceEnd
[static]
GAFMovieClip
  EVENT_TYPE_SEQUENCE_START : String = typeSequenceStart
[static]
GAFMovieClip
Property Detail
currentFrameproperty
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"


Implementation
    public function get currentFrame():uint
currentSequenceproperty 
currentSequence:String  [read-only]

Returns id of the sequence where animation is right now. If there is no sequences - returns null.


Implementation
    public function get currentSequence():String
fpsproperty 
fps:Number

Sets an individual frame rate for GAFMovieClip. If this value is lower than stage fps - the GAFMovieClip will skip frames.


Implementation
    public function get fps():Number
    public function set fps(value:Number):void
inPlayproperty 
inPlay:Boolean  [read-only]

Indicates whether GAFMovieClip instance already in play


Implementation
    public function get inPlay():Boolean
loopproperty 
loop:Boolean

Indicates whether GAFMovieClip instance continue playing from start frame after playback reached animation end


Implementation
    public function get loop():Boolean
    public function set loop(value:Boolean):void
reverseproperty 
reverse:Boolean

If true animation will be playing in reverse mode


Implementation
    public function get reverse():Boolean
    public function set reverse(value:Boolean):void
skipFramesproperty 
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).


Implementation
    public function get skipFrames():Boolean
    public function set skipFrames(value:Boolean):void
smoothingproperty 
smoothing:String

The smoothing filter that is used for the texture. Possible values are TextureSmoothing.BILINEAR, TextureSmoothing.NONE, TextureSmoothing.TRILINEAR


Implementation
    public function get smoothing():String
    public function set smoothing(value:String):void
totalFramesproperty 
totalFrames:uint  [read-only]

The total number of frames in the GAFMovieClip instance.


Implementation
    public function get totalFrames():uint
useClippingproperty 
useClipping:Boolean

if set true - GAFMivieclip will be clipped with flash stage dimensions


Implementation
    public function get useClipping():Boolean
    public function set useClipping(value:Boolean):void
Constructor Detail
GAFMovieClip()Constructor
public function GAFMovieClip(gafTimeline:GAFTimeline, fps:int = -1, addToJuggler:Boolean = true)

Creates a new GAFMovieClip instance.

Parameters
gafTimeline:GAFTimelineGAFTimeline 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
Method Detail
clearSequence()method
public function clearSequence():void

Clear playing sequence. If animation already in play just continue playing without sequence limitation

copy()method 
public function copy():GAFMovieClip

Creates a new instance of GAFMovieClip.

Returns
GAFMovieClip
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
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. 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

Returns
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)

Returns
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

Returns
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)

Event Detail
complete Event
Event Object Type: starling.events.Event

Dispatched whenever the movie has displayed its last frame.

typeSequenceEnd Event  
Event Object Type: starling.events.Event

Dispatched when playhead reached end frame of sequence

typeSequenceStart Event  
Event Object Type: starling.events.Event

Dispatched when playhead reached first frame of sequence

Constant Detail
EVENT_TYPE_SEQUENCE_ENDConstant
public static const EVENT_TYPE_SEQUENCE_END:String = typeSequenceEnd

EVENT_TYPE_SEQUENCE_STARTConstant 
public static const EVENT_TYPE_SEQUENCE_START:String = typeSequenceStart