Class: Stage

createjs~ Stage

Class related to top level container.


new Stage()

Source:

Extends

Members


alpha :number

Transparency.

Type:
  • number
Inherited From:
Default Value:
  • 1
Source:

currentFrame :number

Current frame count of the timeline.

Type:
  • number
Inherited From:
Source:

mask :createjs.Shape

Get shape instance that has graphics of current mask.

Type:
Inherited From:
Source:

mouseX

X coordinate of mouse.

Source:

mouseY

Y coordinate of mouse.

Source:

parent :createjs.MovieClip

Current parent instance.

Type:
Inherited From:
Source:

regY :number

X coordinate of the rotation reference point.

Type:
  • number
Inherited From:
Default Value:
  • 0
Source:

rotation :number

Rotation amount (degree).

Type:
  • number
Inherited From:
Default Value:
  • 0
Source:

scaleX :number

Scale in X direction

Type:
  • number
Inherited From:
Default Value:
  • 1
Source:

scaleY :number

Scale in Y direction

Type:
  • number
Inherited From:
Default Value:
  • 1
Source:

skewX :number

X skew factor (degree).

Type:
  • number
Inherited From:
Default Value:
  • 0
Source:

skewY :number

Y skew factor (degree).

Type:
  • number
Inherited From:
Default Value:
  • 0
Source:

totalFrames :number

Total frame count of the timeline.

Type:
  • number
Inherited From:
Source:

x :number

X coordinate of the current position.

Type:
  • number
Inherited From:
Default Value:
  • 0
Source:

y :number

Y coordinate of the current position.

Type:
  • number
Inherited From:
Default Value:
  • 0
Source:

Methods


addChildAt(child)

Append child that is not defined on the timeline.
This funcion not supported multi instances.

Parameters:
Name Type Description
child createjs~DisplayObject
Inherited From:
Overrides:
Source:
Returns:

Added instance.

Type
createjs~DisplayObject

addEventListener(type, func [, isCapture])

Registers event.

Parameters:
Name Type Argument Default Description
type string

Event type.

func function

Callback when the event fires.
Context 'this' in callback is window.

isCapture bool <optional>
false

Defined for compatibility. Creap.js always ignores it.

Inherited From:
Source:
Returns:

Referece of argument 'func'.

Type
function

dispatchEvent(e)

Fires event.

Parameters:
Name Type Description
e string | createjs.Event

Event type or Event object.

Inherited From:
Source:

gotoAndPlay(frame)

Go to the specified frame and play timeline.

Parameters:
Name Type Description
frame number | string

Frame number or frame label.

Inherited From:
Source:

gotoAndStop(frame)

Go to the specified frame and stop timeline.

Parameters:
Name Type Description
frame number | string

Frame number or frame label.

Inherited From:
Source:

play()

Play timeline.

Inherited From:
Source:

removeAllChildren()

Remove all children that are not defined on the timeline.

Inherited From:
Source:
Returns:

Removed instances.

Type
array.<createjs~DisplayObject>

removeAllEventListeners( [type])

Unregisters all applicable events.

Parameters:
Name Type Argument Default Description
type string <optional>
''

Registered event type. If it regarded as false, unregister all events.

Inherited From:
Source:

removeChild(child)

Remove child that is not defined on the timeline.
This funcion not supported multi instances.

Parameters:
Name Type Description
child createjs~DisplayObject
Inherited From:
Source:
Returns:

Removed instance.

Type
createjs~DisplayObject

removeChildAt(index)

Remove child that is not defined on the timeline from the specified index position.
This funcion not supported multi instances.

Parameters:
Name Type Description
index number

Index of child.

Inherited From:
Source:
Returns:

Removed instance.

Type
createjs~DisplayObject

removeEventListener(type, func [, isCapture])

Unregisters event.

Parameters:
Name Type Argument Default Description
type string

Registered event type.

func function

Regitered callback.

isCapture bool <optional>
false

Defined for compatibility. Creap.js always ignores it.

Inherited From:
Source:

setTransform( [x] [, y] [, scaleX] [, scaleY] [, rotation] [, skewX] [, skewY] [, regX] [, regY])

Set values of instance properties.

Parameters:
Name Type Argument Default Description
x number <optional>
0

X coordinate of the current position.

y number <optional>
0

Y coordinate of the current position.

scaleX number <optional>
1

Scale in X direction

scaleY number <optional>
1

Scale in Y direction

rotation number <optional>
0

Rotation amount (degree).

skewX number <optional>
0

X skew factor (degree).

skewY number <optional>
0

Y skew factor (degree).

regX number <optional>
0

X coordinate of the rotation reference point.

regY number <optional>
0

Y coordinate of the rotation reference point.

Inherited From:
Source:

stop()

Stop timeline.

Inherited From:
Source: