Here i will show you how to make a cursor in flash (AS2 and AS3).


Getting started

Making a cursor in flash is very easy. There are only small differences between AS2  and AS3. We need only a MovieClip for the cursor and some code.


Drag and drop the cursor MovieClip on the timeline (it has to be on all frames!).  This is the class of the cursor:
public class _cursor extends MovieClip{
    public function onEnterFrame(){
        _x = _root._xmouse;
        _y = _root._ymouse;
Somewhere in the maintimeline:
Mouse.hide(); }
Now you have your own cursor in AS2.


Now, AS2 vas very easy. Making it in AS3 is a little bit different.
    import flash.display.MovieClip;
    public class _cursor extends MovieClip{
        public function _cursor():void{
                addEventListener(Event.ADDED_TO_STAGE, this.init);
        private function init(e:Event=null):void{
                removeEventListener(Event.ADDED_TO_STAGE, this.init);
            addEventListener(Event.ENTER_FRAME, this.update);
        private function update(e:Event):void{
             this.x = stage.mouseX+2;
             this.y = stage.mouseY+2;
Now you need only to add the cursor to the game (It should be the highest layer!).