Changing the native cursor in FP10
I just found out you can natively change the mouse cursor in Flash.
This is handy if you want to have a different cursor when going over specific buttons or other DisplayObjects and don’t want to mess about with attaching clips to your mouse position.
For documentation please go here
Below is some quick code and an example:
_arrow.addEventListener( MouseEvent.MOUSE_OVER, arrowOver );
_button.addEventListener( MouseEvent.MOUSE_OVER, buttonOver );
_hand.addEventListener( MouseEvent.MOUSE_OVER, handOver );
_iBeam.addEventListener( MouseEvent.MOUSE_OVER, beamOver );
_arrow.addEventListener( MouseEvent.MOUSE_OUT, function(e:MouseEvent){Mouse.cursor = MouseCursor.AUTO; } );
_button.addEventListener( MouseEvent.MOUSE_OUT, function(e:MouseEvent){Mouse.cursor = MouseCursor.AUTO; } );
_hand.addEventListener( MouseEvent.MOUSE_OUT, function(e:MouseEvent){Mouse.cursor = MouseCursor.AUTO; } );
_iBeam.addEventListener( MouseEvent.MOUSE_OUT, function(e:MouseEvent){Mouse.cursor = MouseCursor.AUTO; } );
function arrowOver(e:MouseEvent):void {
Mouse.cursor = MouseCursor.ARROW;
}
function buttonOver(e:MouseEvent):void {
Mouse.cursor = MouseCursor.BUTTON;
}
function handOver(e:MouseEvent):void {
Mouse.cursor = MouseCursor.HAND;
}
function beamOver(e:MouseEvent):void {
Mouse.cursor = MouseCursor.IBEAM;
}
Please consider to buying me a coffee.






cool, but why do you put it in a Array?
No reason actually, ill clean up the code
Thanks. Now if only Adobe would add more cursors.