ImageContainer

A base class for all display objects that holds Image object.

new ImageContainer(data)

Parameters:
Name Type Description
data Image Image object that is going to be shown

Methods

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.

dispatchEvent(Event)

Dispatches an event to the event flow.

Parameters:
Name Type Description
Event arc.Event object

getAlign() → {String}

Returns the align

Returns:
String A string of the align

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].

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].

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.

setAlign(align)

Sets the align of the Image object.

Parameters:
Name Type Description
align String

setAlpha(An)

Sets an alpha.

Parameters:
Name Type Description
An Number alpha

setHeight(height)

Sets a height.

Parameters:
Name Type Description
height Number A height

setRotation(A)

Sets a rotation.

Parameters:
Name Type Description
A Number rotation in degree

setScaleX(scaleX)

Sets a horizontal scale.

Parameters:
Name Type Description
scaleX Number A horizontal scale

setScaleY(scaleX)

Sets a vartical scale.

Parameters:
Name Type Description
scaleX Number A vartical scale

setVisible(A)

Sets a visibility.

Parameters:
Name Type Description
A Boolean visibility

setWidth(width)

Sets a width.

Parameters:
Name Type Description
width Number A width

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