Class: DisplayObject

createjs~ DisplayObject

Class related to displayable object.


<abstract> new DisplayObject()

Source:

Extends

  • PIXI.Container

Members


alpha :number

Transparency.

Type:
  • number
Default Value:
  • 1
Source:

mask :createjs.Shape

Get shape instance that has graphics of current mask.

Type:
Source:

parent :createjs.MovieClip

Current parent instance.

Type:
Source:

regY :number

Y coordinate of the rotation reference point.

Type:
  • number
Default Value:
  • 0
Source:

regY :number

X coordinate of the rotation reference point.

Type:
  • number
Default Value:
  • 0
Source:

rotation :number

Rotation amount (degree).

Type:
  • number
Default Value:
  • 0
Source:

scaleX :number

Scale in X direction

Type:
  • number
Default Value:
  • 1
Source:

scaleY :number

Scale in Y direction

Type:
  • number
Default Value:
  • 1
Source:

skewX :number

X skew factor (degree).

Type:
  • number
Default Value:
  • 0
Source:

skewY :number

Y skew factor (degree).

Type:
  • number
Default Value:
  • 0
Source:

x :number

X coordinate of the current position.

Type:
  • number
Default Value:
  • 0
Source:

y :number

Y coordinate of the current position.

Type:
  • number
Default Value:
  • 0
Source:

Methods


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.

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.

Source:

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.

Source:

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.

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.

Source:

Events


click

Fires when click on the instance.

Source:

mousedown

Fires when mousedown or touchstart, on the instance.

Source:

pressmove

Fires when mousemove or touchmove, after createjs~DisplayObject.mousedown fires.

Source:

pressup

Fires when mouseup or touchend, after createjs~DisplayObject.mousedown fires.

Source: