In this tutorial I am going to show you how to easily create or achieve the drag & drop event using flash action script

Step 1

Open flash then select file >> new >> flash document


Now in left side menu bar you can select rectangle, or circle

Here I chosen circle.

Create a circle on your blank workspace

Now make this circle a movie clip

Select modify >> convert to symbol

You will see convert to symbol dialog box

In that dialog box you have to select behavior “button” option

Place a name “circle_1” in name box & click ok

You can use any name as per your choice

Go to in action scrip panel

Please select first your object &

Select + sign

Global functions >> movie clip control >> on

Now select

Global function >> movie clip control >> start drag

You need to select the circle and right click on that and select action option.

In action panel copy paste the following code.

on (press) {startDrag(this)}

onClipEvent (mouseUp) {stopDrag()}

pressing following key you can see the drag and drop event.

Press short cut key “ctrl + enter”

You program will be run & you can drag your object by action script

You can download the original file from here : drag-drop-event

3 Responses to “How to create drag & drop event in flash action script”

  1. Gotta take pleasure in the effort you place into your blog :)

  2. Innovations are always welcome, I believe that this information deserve to be discussed more thoroughly.

  3. viola… thank you for blogging about this. You make me happy today… :)

Leave a Reply

Wordpressapi is developer code book.
wordpressapi on Facebook
© 2010 Wordpressapi. All Rights Reserved. Reproduction without explicit permission is prohibited.