-
drag problem
i have a button that i am dragging to a draggable area target. i want there to be an image change (like a mouse over) when the dragged object is hovering over the target area but it isnt working. ive tried a drag over event and i have tried using script for "when this object is over this target...." but that didnt work either. any thoughts?
thanks
-
You could always to a hittest. Make the target area a movieclip and give it an instance name, also, make the button a movieclip as well and give that an instance name
Now on the target area moveclip place the following code
onClipEvent(enterframe){
if (this.hitTest(_root.buttoninstance)){
// Do your stuff
}
}
This is probably a bad way of going about what your trying to accomplish so hopefully someone will help you out better then I
Anyways, good luck
-
hey that worked...now how do i turn that off when they either let go or drag out of that area?
thanks!
-
Glad it did
To make it so something else happens (key word, else) then add the following to the code I gave you
onClipEvent(enterframe){
if (this.hitTest(_root.buttoninstance)){
// Do your stuff
} else
// Do your other stuff
}
}
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
|