SequenceMovieClip

A class that plays an animation by using multiple Image objects.

new SequenceMovieClip(imgArr, frameTime, shouldLoop, shouldHide)

Parameters:
Name Type Description
imgArr Array An array of Image objects
frameTime Number A millisecond of each frame
shouldLoop Boolean If true the animation will be looped
shouldHide shouldHide If true it will be hidden while the animation stops

Methods

addChild(targ)

Adds the display object to the display list.

Parameters:
Name Type Description
targ DisplayObject A display object that is going to be added to the display list

addChildAt(targ, index)

Adds the display object to the display list at the specified depth.

Parameters:
Name Type Description
targ DisplayObject A display object that is going to be added to the display list
index int A depth

addEventListener(type, callback)

Registers an event listener object to EventDispatcher object so that the listener receives the notification.

Parameters:
Name Type Description
type String The type of event.
callback Function The listener function.

clearMask()

Deletes the clipping mask.

contains(targ) → {Boolean}

Determines whether the display object is a child of the display object container.

Parameters:
Name Type Description
targ DisplayObject A display object to test
Returns:
Boolean true if the display object is a child of the display object container

dispatchEvent(Event)

Dispatches an event to the event flow.

Parameters:
Name Type Description
Event arc.Event object

getAlignX() → {Number}

Returns a horizontal position from the origin.

Returns:
Number A horizontal position from the origin

getAlignY() → {Number}

Returns a vartical position from the origin.

Returns:
Number A vartical position from the origin

getAlpha() → {Number}

Gets the alpha.

Returns:
Number An alpha

getHeight() → {Number}

Returns the height.

Returns:
Number A height

getParent() → {DisplayObject}

Returns the parent of this display object.

Returns:
DisplayObject The parent

getRotation() → {Number}

Returns the rotation.

Returns:
Number A rotation in degree

getScaleX() → {Number}

Returns the horizontal scale.

Returns:
Number A horizontal scale

getScaleY() → {Number}

Returns the vartical scale.

Returns:
Number A vartical scale

getStage()

Returns a Stage object.

getVisible() → {Boolean}

Returns the visibility.

Returns:
Boolean A visibility

getWidth() → {Number}

Returns the width.

Returns:
Number A width

getX() → {Number}

Returns the horizontal position.

Returns:
Number A horizontal position

getY() → {Number}

Returns the vartical position.

Returns:
Number A vartical position

globalToLocal(x, y) → {Array}

Converts global positions to local positions.

Parameters:
Name Type Description
x Number A global horizontal position
y Number A global vartical position
Returns:
Array An array that includes local positions of x and y in [x, y].

gotoAndPlay(index)

Plays the animation from the specified frame.

Parameters:
Name Type Description
index int A frame which the animation starts from

gotoAndStop(index)

Stops at the specified frame.

Parameters:
Name Type Description
index int A frame which the animation stops at

localToGlobal(x, y) → {Array}

Converts local positions to global positions.

Parameters:
Name Type Description
x Number A local horizontal position
y Number A local vartical position
Returns:
Array An array that includes global positions of x and y in [x, y].

play(shouldLoop)

Plays the animation.

Parameters:
Name Type Description
shouldLoop Boolean If true the animation will be looped

removeChild(targ)

Removes the display object from the display list.

Parameters:
Name Type Description
targ DisplayObject A display object that is going to be removed from the display list

removeEventListener(type, callback)

Removes a listener from the EventDispatcher object.

Parameters:
Name Type Description
type String The type of event.
callback Function The listener function.

setAlpha(An)

Sets an alpha.

Parameters:
Name Type Description
An Number alpha

setChildIndex(child, index)

Changes a depth of the display object.

Parameters:
Name Type Description
child DisplayObject A display object which is going to be changed its depth.
index Number A new depth

setMask(x, y, width, height)

Sets a clipping mask.

Parameters:
Name Type Description
x Number A horizontal position of the clipping mask
y Number A vartical position of the clipping mask
width Number A width of the clipping mask
height Number A height of the clipping mask

setRotation(A)

Sets a rotation.

Parameters:
Name Type Description
A Number rotation in degree

setVisible(A)

Sets a visibility.

Parameters:
Name Type Description
A Boolean visibility

setX(x)

Sets a horizontal position.

Parameters:
Name Type Description
x Number A horizontal position

setY(y)

Sets a vartical position.

Parameters:
Name Type Description
y Number A vartical position

stop()

Stops the animation.