Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You can easily turn movie clips into draggable objects in ActionScript using two built-in methods called startDrag() and stopDrag(). You will use these methods to give your user drag-and-drop control of the basket_mc clip.
You can call the startDrag() method to make any MovieClip instance (or sprite) draggable and the stopDrag() method to make it no longer draggable. For instance, you may want to make an object draggable when the user presses the mouse button on it, and to make the dragging stop when the mouse button is released. This behavior is what most people think of as dragging and dropping an object. You will add event listeners for the MOUSE_DOWN and MOUSE_UP events to add this functionality to the basket_mc clip.