How to Make a Drag N' Drop Game




About: I like to draw, play my guitar, play sports, even though im kinda lazy. I'd like to think that i'm good at a lot of stuff, but you can decide.

Oh, the drag n' drop game. Those were part of my toddler years, and they were fun. At least, until i found out how to make them. You can make one too! Let's do it.

Stuff you need:

Flash(I'm using CS3, but you can use MX-CS4, any version that supports AS2)

It'll help if you've seen my [http://other] flash tutorial.

This is really simple.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Doing It.

First, make 2 layers. One named "Stick" below, and one named "Objects" on top. Draw a the character you're going to dress up up, I'm using a stick figure. Next, lock the layer. Then, click on the "Objects" layer. Draw the object you'll be dragging onto the stick figure and make it a movie clip. Make sure the registration point is in the center.

Next, press F9 and TYPE this code in the movie clip'sActions box(DON'T copy and paste, you bum. how are you gonna learn the code that way? You'll wish you typed it when i get to complicated stuff):




When this object is clicked...


Start to drag it...


Closes on handler function.


When this object is released...


Stop dragging it.


Closes on handler function.

You're done, just repeat this several times. Each object you make gets this code.

Step 2: Done!

Nice job, you just made a game! Comment, rate, and tell me about any problems you have.

Be the First to Share


    • Book Character Costume Challenge

      Book Character Costume Challenge
    • Made with Math Contest

      Made with Math Contest
    • Cardboard Speed Challenge

      Cardboard Speed Challenge

    9 Discussions


    2 years ago

    Hi, What is CS3? Where can I get it? What is MX-CS4? where can I get it?

    What is AS4 how do I know if my computer supports it?


    9 years ago on Introduction

    Atleast by adding this... I can make a basic game atleast... Just currently... Making the objects required... I'll even add an image of so far (made everything from scratch on Adobe CS4)

    Drag'n'drop - Inferndragon's game.jpg

    9 years ago on Step 1

    Thankyou! I have been looking for a simple to make flash project, and your tutorial makes this one beyond easy. Your instructions are well worded and comprehensive, and your notes on what the actionscript was actually doing made it easy for a flash noob like me to understand. I still cant believe how simple it was! Thanks again.


    10 years ago on Introduction

    I did it but there is a problem. I have a cursor in my flash doc and it's code is: custom_cursor.startDrag("true"); Mouse.hide(); and when I drag the tshirt, the mouse stops going with the cursor. Is there a way I can fix this?