Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Actionscript / February 2008



Tip: Looking for answers? Try searching our database.

useHandCursor and stopDrag

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MikeLB - 29 Feb 2008 10:25 GMT
Hope this is an easy one, I have an mc which is moveable (startDrag) and a
mouse listener that detects if _xmouse  has passes a certain co-ordinate, if it
does then I tell the mc to stopDrag. Part of the moveable mc can extend beyond  
that point and If the user continues to drag the hand cursor persists despite
me asking otherwise, even tried to delete the onPress event.
Thanks

Mikeb

var isMoving:Boolean = false;

target_Mc.onPress = function() {
    this.startDrag();
};
target_Mc.onRelease = function() {
    this.stopDrag();
};
var mouseListener:Object = new Object();
mouseListener.onMouseDown = function() {
    isMoving = true;
};
mouseListener.onMouseMove = function() {
    if (isMoving == true && _xmouse>=370) {

        //delete target_Mc.onPress;
        target_Mc.stopDrag();
        target_Mc.useHandCursor = false; //this doesn't work until the cursor is
dragged out of target_Mc

        updateAfterEvent();

    }
};
Mouse.addListener(mouseListener);
imjustabeginner - 29 Feb 2008 12:39 GMT
Try putting "target_Mc.useHandCursor = false" before "var mouseListener:Object = new Object()"

HTH

Doug
MikeLB - 29 Feb 2008 12:59 GMT
Thanks for the reply Doug, I would still like to use the hand cursor up to the
point that the user drags past that specified point and then it switch back to
the standard pointer despite them having the mouse still depressed and still
within the mc's rect.
Thanks
Mike
imjustabeginner - 29 Feb 2008 13:17 GMT
hmmm, ok, i understand now, ill c what i can do, in the mean time maybe some of the gurus around here will give their .02
MikeLB - 29 Feb 2008 16:20 GMT
Thanks Doug, I've settled on hiding the cursor and switching it with a hand shaped mc (following the _xmouse etc.) -  and using various flag states - not very elegant but does the job!
Cheers
Mike
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.