package scaleform.gfx { import flash.events.Event; public final class MouseCursorEvent extends Event { public var cursor : String = "auto"; public var mouseIdx : uint = 0; static public const CURSOR_CHANGE : String = "mouseCursorChange"; public function MouseCursorEvent() { super("MouseCursorEvent", false, true); } } }
This event serves to track and/or prevent mouse cursor change. It has the following Event’s properties set: bubbles – false, it does not bubble cancellable – true, the default action (cursor change) may be prevented by calling preventDefault() method.
This event is useful to implement custom animated mouse cursor. Whenever Scaleform changes the shape of the mouse cursor (either by rolling over textfield or button, or by setting flash.ui.Mouse.cursor property, this event is fired for a stage (if Extensions.enabled is set to true). Example:
Extensions.enabled = true; function e(e:MouseCursorEvent) { trace(e.type + " " + e.mouseIdx + " "+ e.cursor); e.preventDefault(); } stage.addEventListener(MouseCursorEvent.CURSOR_CHANGE, e);
Note: This event is fired ONLY when the listener is set on a stage.
cursor property
cursor : String [read]
Scaleform version: 4.0.13
The property indicates the type of the cursor to be changed to. It contains one of the string values from flash.ui.MouseCursor class, such as:
* flash.ui.MouseCursor.ARROW : String = “arrow” * flash.ui.MouseCursor.BUTTON : String = “button” * flash.ui.MouseCursor.HAND : String = “hand” * flash.ui.MouseCursor.IBEAM : String = “ibeam”
mouseIdx property
mouseIdx : uint [read]
Scaleform version: 4.0.13
Indicates for which mouse/controller the event is generated (zero-based index).