# Custom Cursor Disappearing

**URL:** https://forum.kirupa.com/t/custom-cursor-disappearing/267114
**Category:** flash
**Created:** [July 28, 2008, 7:52pm UTC](https://forum.kirupa.com/t/custom-cursor-disappearing/267114 "2008-07-28T19:52:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Mosk](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@Mosk](https://forum.kirupa.com/u/Mosk)
#### Post date: [July 28, 2008, 7:52pm UTC](https://forum.kirupa.com/t/custom-cursor-disappearing/267114/1 "2008-07-28T19:52:43Z")

</div>

Hi. I’m using Flash CS3/Action Script 3. I used Mouse.hide to hide the original cursor, then attached a custom cursor (GIF) to follow the mouse around and serve as a new cursor. The custom cursor keeps disappearing behind various elements however.

Using AS3 I did:  
Mouse.hide();  
stage.addEventListener(MouseEvent.MOUSE\_MOVE, moveCursor);  
function moveCursor(myevent:MouseEvent):void{  
mycursor\_mc.x=mouseX;  
mycursor\_mc.y=mouseY;  
myevent.updateAfterEvent();  
}  
addChild(mycursor\_mc);

I’ve tried shifting the layers around and playing with the stacking order, but the cursor keeps disappearing between various elements on different layers.  
Could anyone explain (in newbie detail) how I keep the cursor in view at all times?  
Do i need to use the addChildAt command? And if so, how do I keep the cursor at the top of the stack as new elements are added later in the timeline?

I’m also noting a further problem that after visiting a few spots on my timeline, I get a second mycursor\_mc appearing and the mouse stops functioning (mycursor still follows the mouse movements but i can’t click on any buttons)

Thanks,  
Mosk
