# \[FLASH 8\] Problem with cursor change

**URL:** <https://forum.kirupa.com/t/flash-8-problem-with-cursor-change/257577>\
**Category:** flash\
**Created:** [April 15, 2008, 1:26pm UTC](https://forum.kirupa.com/t/flash-8-problem-with-cursor-change/257577 "2008-04-15T13:26:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rtank](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@rtank](https://forum.kirupa.com/u/rtank)\
**Post date:** [April 15, 2008, 1:26pm UTC](https://forum.kirupa.com/t/flash-8-problem-with-cursor-change/257577/1 "2008-04-15T13:26:18Z")

</div>

Hi everybody.

I got an mc named “zoom” which the mouse cursor should switch into whenever the cursor itself is onRollover on an mc “img”.

This “zoom” mc consists of two frames with (respectively) a “+” zoom cursor and a “-” zoom cursor.

I’m unable to set the cursor in order to display the “-” cursor when “img” is zoomed and the “+” cursor when “img” is not zoomed.

Here’s the code which determines “img” scaling:

```auto
myZoom = function (myDepth)
{
    if (myDepth == "deep")
    {
        myDepth = 4;
    }
    else if (myDepth == "medium")
    {
        myDepth = 8;
    }
    else if (myDepth == "light")
    {
        myDepth = 12;
    } // end else if

    img.onRelease = function()
    {
        if (k > 0)
        {
            return;
        } // end if
        zoom = true;
        dir == 1 ? (dir = -1) : (dir = 1);
        if (dir == 1)
        {
            pt = {x: img._xmouse, y: img._ymouse};
        } // end if
    };
    this.onEnterFrame = function ()
    {
        if (!zoom)
        {   
            return;
        } // end if
        img._xscale = img._xscale + dir * k * 50 / myDepth;
        img._yscale = img._yscale + dir * k * 50 / myDepth;
        var pt2 = {x: pt.x, y: pt.y};
        img.localToGlobal(pt2);
        img._x = img._x - (pt2.x - pt.x);
        img._y = img._y - (pt2.y - pt.y);
        ++k;
        if (k == 8)
        {   
            zoom = false;
            k = 0;
        } // end if
    };
};
myZoom("medium");

```

Thanks!
