Changing between cursors

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:

_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

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

try this:


_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.

can you post the fla

Dutchy