Copy link to clipboard
Copied
if zoom a movie clip...i want drag and drop the mc...and also don't go the mc outside the screen..pls help me...:(
Copy link to clipboard
Copied
To drag within a limited area you use the startDrag() method, defining a rectangle to limit how far the object can be moved in any direction. The startDrag is normally executed when a MOUSE_DOWN event occurs for the object that is to be dragged. A MOUSE_UP event is what is used to trigger a call to the stopDRag() method, whereby the listener for that is usually assigned to the stage.
Search Google for a tutorial using terms like "AS3 drag drop tutorial" if you need detailed coding help to get started.
Copy link to clipboard
Copied
how can i set the limit for the rectangle..ie i want to move my mc inside the stage only and dont want to see the background...
Find more inspiration, events, and resources on the new Adobe Community
Explore Now