Skip to main content
Participant
September 7, 2013
Question

zoom, drag and drop in a movie clip

  • September 7, 2013
  • 2 replies
  • 598 views

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...:(

This topic has been closed for replies.

2 replies

sharsadAuthor
Participant
September 9, 2013

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...

Ned Murphy
Legend
September 7, 2013

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.