Mouse crosshair

Code Actionscript 2.0

Instance action

on (rollOver) {
startDrag(_root.crosscursor, true);
Mouse.hide();
_root.crosscursor._visible = true;
}
on (rollOut) {
stopDrag();
Mouse.show();
_root.crosscursor._visible = false;
}

Code Actionscript 3.0

square.addEventListener(MouseEvent.MOUSE_OVER, rollOver); square.addEventListener(MouseEvent.MOUSE_OUT, rollOut); function rollOver(e:MouseEvent) { crosscursor.startDrag(true); Mouse.hide(); crosscursor.visible = true; } function rollOut(e:MouseEvent) { crosscursor.stopDrag(); Mouse.show(); crosscursor.visible = false; }

Description

When the mouse rolls over the white square, the cursor is replaced by a crosshair.

Download

Right click: Flashfile AS 2.0 | Flashfile AS 3.0 | SWF-File


Share