Static methods

staticfromJSON(timeline:Timeline):Null<FlxTimeline>

Creates a FlxTimeline instance from the Animation file.

Parameters:

timeline

The animation file's timeline.

Returns:

a new FlxTimeline instance.

Constructor

new(?layers:Array<FlxLayer>)

Parameters:

layers

the amount of layers the timeline is set.

Variables

read onlylength:Int

The total of layers the timeline has.

read onlytotalFrames:Int

The total length of frames that the timeline has.

Methods

@:value({ position : 0 })add(position:Int = 0, name:EitherType<String, FlxLayer>):FlxLayer

Inserts a new layer from a position,

Parameters:

position

if it's ignored, it'll be set to 0.

name

The layer you want to add. it can be either a String or a FlxLayer.

get(name:EitherType<String, Int>):FlxLayer

Gets a layer.

WARNING: it can return null!

Parameters:

name

Either the name of the layer or the position of it.

Returns:

Either a FlxLayer instance or null.

getList():Array<FlxLayer>

Gets a list of layers that the timeline has.

WARNING: Do not confuse getListNames() with getList!

Returns:

getListNames():Array<String>

Gets a list layers' names that the timeline has.

WARNING: Do not confuse getListNames() with getList!

Returns:

hide(name:EitherType<String, Int>):Void

Gets and sets the layer visibility to false.

Parameters:

name

The layer in question. Can be either a String or an Int.

remove(name:EitherType<String, FlxLayer>):Null<FlxLayer>

Removes a layer from the list.

Parameters:

name

The layer in question. Can be either a String or a FlxLayer.

show(name:EitherType<String, Int>):Void

Gets and sets the layer visibility to true.

Parameters:

name

The layer in question. Can be either a String or an Int.

@:value({ swfRender : false })inlineupdateRender(elapsed:Float, curFrame:Int, dictionary:Map<String, FlxSymbol>, swfRender:Bool = false):Void