# Custom cursor to return to the regular mouse cursor

**URL:** https://forum.kirupa.com/t/custom-cursor-to-return-to-the-regular-mouse-cursor/276917
**Category:** Uncategorized
**Created:** [December 4, 2008, 11:21pm UTC](https://forum.kirupa.com/t/custom-cursor-to-return-to-the-regular-mouse-cursor/276917 "2008-12-04T23:21:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![wuzzi2ya](https://avatars.discourse-cdn.com/v4/letter/w/e79b87/32.png) [@wuzzi2ya](https://forum.kirupa.com/u/wuzzi2ya)
#### Post date: [December 4, 2008, 11:21pm UTC](https://forum.kirupa.com/t/custom-cursor-to-return-to-the-regular-mouse-cursor/276917/1 "2008-12-04T23:21:58Z")

</div>

How can I get my custom cursor to return to the regular mouse cursor when in the bottom 3rd of my flash movie. I need to do this for nav functions and I want the regular cursor actions in this area. So to recap: within the top 2/3 of the movie I will have my custom cursor, upon entering the bottom 3rd of my movie I need the cursor to switch back and vice verse…

my code below, please any suggestions are very helpful as I have tried several things:

stop();

import flash.events.Event;  
import flash.events.MouseEvent;  
import flash.ui.Mouse;

Mouse.hide();

stage.addEventListener(MouseEvent.MOUSE\_MOVE, moving);  
function moving(evt:MouseEvent):void {  
if (cursor.currentFrame != 0) {  
cursor.gotoAndStop(1);  
}  
cursor.x = stage.mouseX;  
cursor.y = stage.mouseY;  
cursor.mouseEnabled = false;  
evt.updateAfterEvent();  
}

//These three eventlisteners are telling flash to “listen” for specific events  
//in our case if the mouse moves and if the mouse button is down or up.  
//then if one of these events happens, it calls a function (mouse\_down, mouse\_up or moving).  
stage.addEventListener(MouseEvent.MOUSE\_DOWN, mouse\_down);  
stage.addEventListener(MouseEvent.MOUSE\_UP, mouse\_up);

// This is how to construct a simple function,  
// this function will write in our text field “mouse is moving”  
// when the even is raised by the eventlistener

// function just like above, just for the mouse down event.

function mouse\_down(e:MouseEvent) {  
if (mouseX \< 800 && mouseY \< 450) {  
timer.start();  
timer2.start();  
}  
}

// function just like above, just for the mouse up event.  
function mouse\_up(e:MouseEvent) {  
timer.stop();  
timer2.stop();  
}

Thanks again and help!
