Class createjs.Sprite
Extends
.
Defined in: sprite.js.
Constructor Attributes | Constructor Name and Description |
---|---|
createjs.Sprite(spriteSheet, opt_frameOrAnimation)
A class that displays a frame or sequence of frames (i.e.
|
Method Attributes | Method Name and Description |
---|---|
advance(opt_time)
Advances the play position.
|
|
gotoAndPlay(value)
Sets paused to false and plays the specified animation name, named frame, or
frame number.
|
|
gotoAndStop(value)
Sets paused to true and seeks to the specified animation name, named frame,
or frame number.
|
|
layout(renderer, parent, dirty, time, draw)
|
|
paintObject(renderer)
|
|
play()
Starts playing (unpause) the current animation.
|
|
removeAllChildren(opt_destroy)
|
|
stop()
Stops playing a running animation.
|
Class Detail
createjs.Sprite(spriteSheet, opt_frameOrAnimation)
A class that displays a frame or sequence of frames (i.e. an animation) in a
createjs.SpriteSheet object.
- Parameters:
- {createjs.SpriteSheet} spriteSheet
- {(string|number)=} opt_frameOrAnimation
Method Detail
advance(opt_time)
Advances the play position. This occurs automatically each tick by default.
- Parameters:
- {number=} opt_time
gotoAndPlay(value)
Sets paused to false and plays the specified animation name, named frame, or
frame number.
- Parameters:
- {string|number} value
gotoAndStop(value)
Sets paused to true and seeks to the specified animation name, named frame,
or frame number.
- Parameters:
- {string|number} value
isVisible()
layout(renderer, parent, dirty, time, draw)
- Parameters:
- renderer
- parent
- dirty
- time
- draw
paintObject(renderer)
- Parameters:
- renderer
play()
Starts playing (unpause) the current animation. The Sprite will be paused if
either the Sprite.stop() method or the Sprite.gotoAndStop() method is called.
Single frame animations will remain unchanged.
removeAllChildren(opt_destroy)
- Parameters:
- opt_destroy
stop()
Stops playing a running animation. The Sprite will be playing if the
Sprite.gotoAndPlay() method is called. Note that calling the
Sprite.gotoAndPlay() method or the Sprite.play() method will resume playback.