class org.aswing.CursorManager
The CursorManager, manage the cursor, hide system mouse cursor, show custom cursor, etc. @author paling
Class Fields
static function getManager(?stage:Stage = null): CursorManager
Returns the default cursor manager for specified stage.
Generally, you should call this method to get cursor manager, it will create one manager for each stage.
stage | the stage, if pass null, the inital Stage of |
Instance Fields
function new(cursorRoot:DisplayObjectContainer): Void
Create a CursorManage @see #getManager()
cursorRoot | the container to hold the cursors |
function hideCustomCursor(cursor:DisplayObject): Void
Hides the custom cursor which is showing and show the system cursor.
cursor | the showing cursor, if it is not the showing cursor, nothing will happen |
function setCursor(trigger:Component, cursor:DisplayObject): Void
Sets the cursor when mouse on the specified trigger. null to remove cursor for that trigger.
trigger | where the cursor will shown when the mouse on the trigger |
cursor | the cursor object, if cursor is null, the trigger's current cursor will be removed |
function showCustomCursor(cursor:DisplayObject, ?hideSystemCursor:Bool = true): Void
Shows your display object as the cursor and/or not hide the system cursor. If current another custom cursor is showing, the current one will be removed and then the new one is shown.
cursor | the display object to be add to the cursor container to be the cursor |
hideSystemCursor | whether or not hide the system cursor when custom cursor shows. |