# Weird Cutom mouse pointer issue

**URL:** <https://forum.kirupa.com/t/weird-cutom-mouse-pointer-issue/229648>\
**Category:** flash\
**Created:** [June 19, 2007, 7:45am UTC](https://forum.kirupa.com/t/weird-cutom-mouse-pointer-issue/229648 "2007-06-19T07:45:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShaneTaylor](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@ShaneTaylor](https://forum.kirupa.com/u/ShaneTaylor)\
**Post date:** [June 19, 2007, 7:45am UTC](https://forum.kirupa.com/t/weird-cutom-mouse-pointer-issue/229648/1 "2007-06-19T07:45:03Z")

</div>

\*\*Weird custom mouse pointer issue

\*\*I am trying to create a custom mouse pointer . Although it works, it works in a very weird way. The mouse gets over the mouse pointer graphics !

This is the code:

```auto
// pseudoMouse is the class of an mc in Library
//pad is the instance name of an mc on stage
//When mouseover mc, the cursor shows up
package{
    import flash.display.MovieClip;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.ui.Mouse;
    
    public class MouseManage extends MovieClip{
        private var cursor:pseudoMouse;
        
        public function MouseManage():void{
            cursor=new pseudoMouse();
            addChild(cursor);
            pad.addEventListener(MouseEvent.MOUSE_OVER,mOver);
            pad.addEventListener(MouseEvent.MOUSE_OUT,mOut);
        }
        
        private function mOut(event:MouseEvent):void{
            Mouse.show();
            pad.removeEventListener(MouseEvent.MOUSE_MOVE, redrawCursor);
            cursor.visible = false;
        }
        private function mOver(event:MouseEvent):void{
            
            Mouse.hide();
            cursor.visible =true;
            pad.addEventListener(MouseEvent.MOUSE_MOVE, redrawCursor);
        }
        
        private function redrawCursor(event:MouseEvent):void{
                 cursor.x = event.stageX;
                   cursor.y = event.stageY;
                event.updateAfterEvent();
        }
        
        
    }
}

```

Attached is the complete fla+as for your convenience .

Any help would be much appreciated .

Thank you all.
