# Changing between cursors

**URL:** <https://forum.kirupa.com/t/changing-between-cursors/184735>\
**Category:** Uncategorized\
**Created:** [April 7, 2006, 10:32am UTC](https://forum.kirupa.com/t/changing-between-cursors/184735 "2006-04-07T10:32:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BevD](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@BevD](https://forum.kirupa.com/u/BevD)\
**Post date:** [April 7, 2006, 10:32am UTC](https://forum.kirupa.com/t/changing-between-cursors/184735/1 "2006-04-07T10:32:00Z")

</div>

Hi,

I’m building a little spot the ball game where I need the cursor to change when it is over the photo but change back when it’s over a specific button.

I have used the following code:

```auto
_root.cursor_mc.swapDepths(1000);
_root.onEnterFrame = function() {
        Mouse.hide();
        cursor_mc._x = _root._xmouse;
        cursor_mc._y = _root._ymouse;
}

_root.results.hotspot_mc.onRollOver = function() {
        Mouse.show();
        
}

```

This changes the cursor to cursor\_mc fine but not back again once it is over the specified hotspot. Can anyone tell me where I’m going wrong?

Many thanks  
Bev

---

<div class="post-metadata">

**Author:** ![Dutchy](https://avatars.discourse-cdn.com/v4/letter/d/65b543/32.png) [@Dutchy](https://forum.kirupa.com/u/Dutchy)\
**Post date:** [April 7, 2006, 10:55am UTC](https://forum.kirupa.com/t/changing-between-cursors/184735/2 "2006-04-07T10:55:45Z")

</div>

Well your onEnterFrame keeps going, so it will hide the mouse again.

try this:

```auto

_root.results.hotspot_mc.onRollOver = function() {
        Mouse.show();
        delete _root.onEnterFrame;
}
_root.results.hotspot_mc.onRollOut = function() {
        _root.onEnterFrame = function() {
        Mouse.hide();
        cursor_mc._x = _root._xmouse;
        cursor_mc._y = _root._ymouse;
}
}

```

Dutchy

---

<div class="post-metadata">

**Author:** ![BevD](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@BevD](https://forum.kirupa.com/u/BevD)\
**Post date:** [April 7, 2006, 11:00am UTC](https://forum.kirupa.com/t/changing-between-cursors/184735/3 "2006-04-07T11:00:28Z")

</div>

> [@Dutchy](#):
>
> Well your onEnterFrame keeps going, so it will hide the mouse again.
> 
> try this:
> 
> ```auto
> 
> _root.results.hotspot_mc.onRollOver = function() {
> Mouse.show();
> delete _root.onEnterFrame;
> }
> _root.results.hotspot_mc.onRollOut = function() {
> _root.onEnterFrame = function() {
> Mouse.hide();
> cursor_mc._x = _root._xmouse;
> cursor_mc._y = _root._ymouse;
> }
> }
> 
> ```
> 
> Dutchy

Hi,

thanks for that - unfortunately it doesn’t seem to work, the cursor doesn’t change back once it is over the hotspot.

---

<div class="post-metadata">

**Author:** ![Dutchy](https://avatars.discourse-cdn.com/v4/letter/d/65b543/32.png) [@Dutchy](https://forum.kirupa.com/u/Dutchy)\
**Post date:** [April 7, 2006, 11:56am UTC](https://forum.kirupa.com/t/changing-between-cursors/184735/4 "2006-04-07T11:56:23Z")

</div>

can you post the fla

Dutchy
