This tutorial is in action-script 2.0

First, lets make a cursor.
Draw a cursor and turn it into a movie clip.
open up the actions window for the movie clip and place this action-script in it:

[ccN_actionscript]this.startDrag("true");[/ccN_actionscript]

now go into your first frame's actions window and type:

[ccN_actionscript]Mouse.hide();[/ccN_actionscript]

congratz! you now have a custom cursor!

but, lets do a little more now.

go into your cursor's movie-clip and make two dynamic text boxes next to your cursor. now, give one box the instance name mousex and the other the instance name mousey.

now, select your cursor image (not the text boxes) and make it into a movie-clip again, so you have a movie-clip inside a movie-clip. in the actions of your new movie clip, type:

[cc_actionscript]
onClipEvent(enterFrame){
_parent.mousex.text = _root._xmouse;
_parent.mousey.text = _root._ymouse;
}
[/cc_actionscript]

Now you can see the coordinates of your mouse!

Be Sociable, Share!