Ok, I decided since alot of people use this nowadays, I would give a little tutorial on how to do this.
1. Convert your object that you want to be draggable to a symbol (F8 or right click on the object itself and find convert to symbol) make sure the symbol you make is a movie clip, not a button or graphic.
2. Now that you have your symbol, click on it and go to the properties panel(If you don't have it up, go to Windows then click on Properties or just push CTRL+F3) On the left top side of the box, you will see a drop-down menu that should have movie clip in it. Go right under than and click on the box with instance name in it. Name your object a name that is appropriate for this action.(I'll name mine menudrag)
3. Now,(Still being clicked on your object) Open your actions panel(Windows Actions or F9)
Copy and Paste this actionscript in your actions panel for your frame.
|
on (press) {
startDrag(menudrag); } on (release) { stopDrag(); } |
Explanation of the actionscript:
on (press) - Means when a user presses their mouse down, this action occurs startDrag(menudrag); // This is to start your drag for your drag and drop(the menudrag is the name I had you put in the instance box earlier, you need to replace this if you named your differently)
on (release) {
stopDrag();
}
- This Just ends the dragging when the mouse is let go.
Thanks, Hope I explained well.






" 1. Convert your object that you want to be draggable to a symbol (F8 or right click on the object itself and find convert to symbol) make sure the symbol you make is a movie clip, not a button or graphic. "
no, it has to be a BUTTON NOT A MOVIE CLIP!!!