-
I have a object that as a code that makes the object move like if it was the mouse. A drag and hide mouse cursor kind of code.
But i want to limit the area of moving. i don´t want it to stop drag, i want that if the object passes in to none permitid area it stops.
Like a car in a city hat can go out of the road.
Did i make myself clear??
Thanks for your help guys.
-
You can stipulate a "bounding box" when using startDrag().
For example:
Code:
onClipEvent (mouseDown){
this.startDrag(true,15,15,500,250);
}
"true" will lock the cursor to the middle of the Movie Clip and the numbers are coordinates for the bounding box (rectangle) that the object is confined to.
the first (15) is the left
the second (15) is the top
the third (500) is the right
the forth (250) is the bottom
You can see a VERY OLD ver2.8 example here:
http://www.bridel.org/koolmoves/demo.../dragdrop.html
Hope that helps a little...
Hilary
--
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
|