-
startDrag problem
Hello!
I am using this code to make a draggable bar within a long box. It works great except when I roll out, it continues to drag back and forth, depending on where the mouse is on the rest of the screen, even though it's not over the movie clip itself.
This is the code I used on the timeline:
// Starts the dragging
_root.connect.onRollover = function() {
_root.connect.startDrag(false, 50, 148, 655, 148)
}
// Stops the dragging
_root.connect.onRollout=function(){
this.stopDrag();
}
OR does anyone have any other suggestions? the site I'm modeling this function after is www.andytitus.com
Thanks!
-
Senior Member
Dear Furpants
u r using onRollOver for to start drag and onRollOut to stop drag.
according to ur code, ur file shouldn't work (even not start drag) coz u r using onRollover instead of onRollOver and onRollout instead of onRollOut.
when u change ur spellings ur file will work only to start drag not to stop drag.
coz when u r draging ur object by rollingover ur mouse is always rollsover. so onRollOut wouldn't work.
i think u shoud use either onRollOver to start drag and OnRelease to stop drag or onPress to start drag and onRelease to stop drag.
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|