Class List

Class Stage

Extends DisplayObjectContainer.
The Stage represents the entire area of canvas where display contents are shown. The Stage is the root of all display objects.

Class Summary
Constructor Attributes Constructor Name and Description
 
Stage()
Constructor.
Field Summary
Field Attributes Field Name and Description
 
Refer to the working canvas.
 
Refer to the working context.
 
Refer to current dragging object.
 
Refer to current mouse target if set traceMouseTarget to true.
 
The x coordinate of mouse position on stage.
 
The y coordinate of mouse position on stage.
 
Determine whether trace mouse target.
Fields borrowed from class DisplayObjectContainer:
children, mouseChildren
Fields borrowed from class DisplayObject:
alpha, height, id, mouseEnabled, name, parent, regX, regY, rotation, scaleX, scaleY, stage, useHandCursor, visible, width, x, y
Method Summary
Method Attributes Method Name and Description
 
clear(x, y, width, height)
Clears the canvas by specific rectangle, if not set, clear the whole canvas
 
Gets the frame rate of the stage.
 
Gets whether the stage stops rendering.
 
The current height of the Stage.
 
The current width of the Stage.
 
setCursor(cursor)
Sets the mouse cursor type of the stage.
 
setFrameRate(frameRate)
Sets the frame rate of the stage.
 
setPaused(pause, pauseInNextFrame)
Determines whether start or stop rendering of the stage.
 
startDrag(target, bounds)
Lets the user drag the specified display object.
 
Ends the startDrag() method.
Methods borrowed from class DisplayObjectContainer:
addChild, addChildAt, contains, getChildAt, getChildByName, getChildIndex, getNumChildren, getObjectUnderPoint, removeAllChildren, removeChild, removeChildAt, removeChildByName, setChildIndex
Methods borrowed from class DisplayObject:
getCurrentHeight, getCurrentWidth, getRect, getStage, globalToLocal, hitTestObject, hitTestPoint, localToGlobal, localToTarget, onMouseEvent, render, toString
Methods borrowed from class EventDispatcher:
addEventListener, dispatchEvent, hasEventListener, removeAllEventListeners, removeEventListener, removeEventListenerByType
Class Detail
Stage()
Constructor.
Field Detail
canvas
Refer to the working canvas.

context
Refer to the working context.

dragTarget
Refer to current dragging object.

mouseTarget
Refer to current mouse target if set traceMouseTarget to true.

mouseX
The x coordinate of mouse position on stage.

mouseY
The y coordinate of mouse position on stage.

traceMouseTarget
Determine whether trace mouse target.
Method Detail
clear(x, y, width, height)
Clears the canvas by specific rectangle, if not set, clear the whole canvas
Parameters:
x
y
width
height

getFrameRate()
Gets the frame rate of the stage.

getPaused()
Gets whether the stage stops rendering.

getStageHeight()
The current height of the Stage.

getStageWidth()
The current width of the Stage.

setCursor(cursor)
Sets the mouse cursor type of the stage.
Parameters:
cursor

setFrameRate(frameRate)
Sets the frame rate of the stage.
Parameters:
frameRate

setPaused(pause, pauseInNextFrame)
Determines whether start or stop rendering of the stage.
Parameters:
pause
pauseInNextFrame

startDrag(target, bounds)
Lets the user drag the specified display object.
Parameters:
target
bounds

stopDrag()
Ends the startDrag() method.

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jul 25 2011 15:02:39 GMT+0800 (CST)