Reputation: 4534
I am unable to set my flash cursor from auto to move, any help ?
private function itemCursorMove(e:MouseEvent){
Mouse.cursor = "move";
e.currentTarget.addEventListener(MouseEvent.MOUSE_OUT,itemCursorAuto);
}
Upvotes: 0
Views: 341
Reputation: 18747
You have to manually registerCursor()
a "move" cursor. In order to register a new mouse cursor, you need to have:
MouseCursorData
object, filled with this data. Description here. You just create it, fill its properties and pass it to...Mouse.registerCursor()
call. The manual is here. In short, you provide it a String that will be the name of the cursor, and a prepared object.This is only needed to be done once at initialization. An example:
var mcd:MouseCursorData=new MouseCursorData();
mcd.data=Vector.<BitmapData>([new MyCursorImage().bitmapData]); // a single image
// MyCursorImage is an asset of type Bitmap
mcd.hotSpot=new Point(); // top left corner is action point
Mouse.registerCursor("move",mcd);
Upvotes: 1