Package | flash.ui |
Class | public final class MouseCursorData |
Inheritance | MouseCursorData Object |
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10.2, AIR 2.6 |
To display the cursor, use the Mouse.registerCursor()
function. To return
control of the cursor image to the operating system, call Mouse.unregisterCursor()
.
Call Mouse.supportsNativeCursor
to test whether native cursors are supported on the
current computer.
The maximum cursor size is 32x32 pixels.Transparency is supported on most operating systems.
A native mouse cursor is implemented directly through the operating system cursor mechanism
and is a more efficient means for displaying a custom cursor image than using a display object.
You can animate the cursor by supplying more than one image in the data
property
and setting the frame rate.
The cursor is only displayed within the bounds of the stage. Outside the stage, control of the cursor image returns to the operating system
Learn more
Related API Elements
Property | Defined By | ||
---|---|---|---|
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
data : Vector.<BitmapData>
A Vector of BitmapData objects containing the cursor image or images. | MouseCursorData | ||
frameRate : Number
The frame rate for animating the cursor. | MouseCursorData | ||
hotSpot : Point
The hot spot of the cursor in pixels. | MouseCursorData | ||
prototype : Object [static]
A reference to the prototype object of a class or function object. | Object |
Method | Defined By | ||
---|---|---|---|
Creates a MouseCursorData object. | MouseCursorData | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object |
data | property |
data:Vector.<BitmapData>
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10.2, AIR 2.6 |
A Vector of BitmapData objects containing the cursor image or images.
Supply more than one image and set the framerate
property to
animate the cursor.
The maximum cursor size is 32x32 pixels.
Implementation
public function get data():Vector.<BitmapData>
public function set data(value:Vector.<BitmapData>):void
frameRate | property |
frameRate:Number
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10.2, AIR 2.6 |
The frame rate for animating the cursor.
Suppy more than one image in the data
property and set the
frame rate to a value greater than 0 to animate the cursor. The cursor frame rate
may differ from the current SWF frame rate.
Implementation
public function get frameRate():Number
public function set frameRate(value:Number):void
hotSpot | property |
hotSpot:Point
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10.2, AIR 2.6 |
The hot spot of the cursor in pixels.
The hotspot is the point on the cursor under which mouse clicks are registered. By default, the hot spot is the upper-left corner (0,0).
Implementation
public function get hotSpot():Point
public function set hotSpot(value:Point):void
MouseCursorData | () | Constructor |
public function MouseCursorData()
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10.2, AIR 2.6 |
Creates a MouseCursorData object.
To display the cursor, call the Mouse.registerCursor()
function.
Related API Elements
Mon Nov 28 2011, 06:48 AM -08:00