Search  

DEFINING BOUNDARIES FOR CUSTOM CURSORS

HomeForumsHelp NeededDefining Boundaries for Custom Cursors
Default-profile clopez40
3 posts
Bought between 50 and 99 items

I have a _mc (called: normalSize) that is 686px x 489px. I want to have a custom cursor (magnifying glass – _mc is called cursor_mc) to appear over normalSize when someone rolls over it. But, when someone is outside normalSize I want the default Flash cursor to appear.

So far I have this for the custom cursor, but I’m hoping someone is kind enough to help me with setting the boundary. This is the code I have:

_root.cursor_mc.swapDepths(1000);

_root.onEnterFrame = function() {

Mouse.hide();
cursor_mc._x = _xmouse;
cursor_mc._y = _ymouse;

}

Thanks in advance,

Christian

Posted 2 months ago
52173 dSKY
548 posts
Exclusive author Author was featured Referred at least one person Sold between 10 000 and 50 000 dollars Bought between 1 and 9 items

first of all , don’t use onEnterFrame; you should use startDrag();
Look it up in flash help, it also provides parameters for limiting dragging area.

Posted 2 months ago
22362 theflyingtinman
452 posts
Item was featured Sold between 1 and 100 dollars

This should do the trick :

normalSize.onRollOver = function()
{
    Mouse.hide();
    cursor_mc._x = _xmouse;
    cursor_mc._y = _ymouse;
    cursor_mc._visible = true;
    cursor_mc.startDrag();
}

normalSize.onRollOut = function()
{
    Mouse.show();
    cursor_mc._x = 0;
    cursor_mc._y = 0;
    cursor_mc._visible = false;
    cursor_mc.stopDrag();
}
Posted 2 months ago
Default-profile clopez40
3 posts
Bought between 50 and 99 items

The flyingtinman, you ARE THE MAN !!! That did it…Coulldn’t have done it without you! Spent all night trying to figure that out. Thanks.

Posted 2 months ago