API Docs for: 1.4.0
Show:

MovieClip Class

Extends Sprite
Module: PIXI

A MovieClip is a simple way to display an animation depicted by a list of textures.

Constructor

MovieClip

(
  • textures
)

Parameters:

  • textures Array

    an array of {Texture} objects that make up the animation

Methods

gotoAndPlay

(
  • frameNumber
)

Goes to a specific frame and begins playing the MovieClip

Parameters:

  • frameNumber Number

    frame index to start at

gotoAndStop

(
  • frameNumber
)

Stops the MovieClip and goes to a specific frame

Parameters:

  • frameNumber Number

    frame index to stop at

play

()

Plays the MovieClip

stop

()

Stops the MovieClip

Properties

animationSpeed

Number

The speed that the MovieClip will play at. Higher is faster, lower is slower

Default: 1

currentFrame

Number

[read-only] The index MovieClips current frame (this may not have to be a whole number)

Default: 0

loop

Boolean

Whether or not the movie clip repeats after playing.

Default: true

onComplete

Function

Function to call when a MovieClip finishes playing

playing

Boolean

[read-only] Indicates if the MovieClip is currently playing

textures

Array

The array of textures that make up the animation

totalFrames

Number

[read-only] totalFrames is the total number of frames in the MovieClip. This is the same as number of textures assigned to the MovieClip.

Default: 0