<classwork>

Custom Pointers & Cursors

To set a custom cursor to the mouse you need to hide the mouse and set a movie clip to follow the mouse.

Make a movie clip that you want to follow the mouse and attach the following script to that movie clip:

onClipEvent (enterFrame) {
Mouse.hide();
}


onClipEvent (mouseMove) {
this._x = _root._xmouse;
this._y = _root._ymouse;
}


You can also set some very basic Cursors:

0 Plus cursor (+)
1 black arrow
2 white arrow
3 four-way arrow
4 two-way horizontal arrow
5 two-way vertical arrow
6 X
7 hand cursor

Just set this function on Frame 1 of your movie:

function setCursor() {
fl.tools.setCursor(cursor number);
}

cursor number is 1-7 from above.

so for a hand cursor, type in the following:

function setCursor() {
fl.tools.setCursor(7);
}

Download some samples