Flash tutorials
Home 3D (2) Actionscripting (65) Animation (100) Audio (4) Drawing (7) Full flash sites (4) Getting Started (15) Navigation (25) Special Effects (52) Text Effects (38)

Simple Drag and Drop

31.7.2006, 1:23    Total views: 37740
Drag and drop technics are very popular in Flash. Using that technic, you can move your object and place it wherever you like. This tutorial will show you how create a drag and drop movie.



Step 1

Start by creating a 250x150px document in flash. Frame rate set to 32fps (Frames per second).





Step 2


Draw something, and convert it into a Movie Clip (Ctrl+A+F8).



Step 3

Click once on that new made Movie Clip to select it, Open the Action Script Panel (F9) and Paste this script:

on (press) {
   startDrag(this);
}

on (release) {
   stopDrag();
}

on (press) {
   startDrag(this);
}

on (release) {
   stopDrag();
}


Test your movie (Ctrl+Enter)

We're done!

Enjoy!

Download source file (.fla)

Have questions about this tutorial?
Visit our friendly Community Forums!
Digg it! Add this tutorial to del.icio.us! Furl it! Add this tutorial to reddit! Spurl it! Add this tutorial to technorati!

Top tutorials

1. Advanced full flash site - Part 1
Total views: 221536

2. Water effect
Total views: 166042

3. Photo slide show
Total views: 153641

4. High-tech city animation
Total views: 151459

5. Special Picture Effect
Total views: 146247

Related links