back

Creating dress-up games with flash


Important stuff | Organizing | Drawing | Drag + Drop | Buttons

Important stuff to know:

This tutorial uses Actionscript 2.0. You can select it when creating a new movie or by clicking your stage and looking in the properties panel.

Important shortcuts and code:

Making movieclips, graphics and buttons: Select your drawing and press F8. Make sure to select what type of symbol you want it to be and name it.

Opening the actionscript panel: Select the frame or symbol you want your script to be on. Then press F9, and the panel will open up for that frame.

Preventing your movie or symbol from playing if it has multiple frames: On the first frame of your timeline or symbol, create a layer for actionscript. Then, open the AS panel, and add the code: stop();

Organizing your game:

First thing we're gonna do is figure out how to organize our game! All of our game will be one one frame. Here's what the timeline for my game looks like!.

Theres a layer for the doll, the items, and an actionscript layer. If you want to get even more organized (which I heavily recommend especially if you plan on having a lot of items), you can organize like this:

This is a good way to make sure which items go under or over other items! You could manually set it all on one layer by selecting your item, clicking the modify tab, then the arrange tab, then setting if it should go in the front of back... but this is much more efficient!


Drawing your assets:

Of course, if you're gonna make a dress up game, you need a doll and clothes! I'm not gonna explain how to draw clothes or making a dress up doll. You can either draw in flash itself, or import drawings, whatever works for you.

If you do want to import your drawing, make sure you go to File > Publish Settings, and set JPEG quality to 100, so your images dont look like crap.

Make sure to convert all of your drawings, regardless of if they were made in flash or not, to a movie clip.

This part is IMPORTANT! Give each of your movieclips a UNIQUE instance name in the properties tab.
For example:

(click if you cant see)

Actually coding the damn thing

Drag and Drop:

If you want, you can download this example to mess with in flash.

To make your items draggable, click on your item once. Not twice, as we don't want to go into the movieclip. Make sure that the layer your item is on is unlocked. Then open up the actionscript tab.

Add the following code:

And do this for each of the items you want to be draggable! Now when you playtest, you should be able to move your items to your doll!

Buttons:

comin soon boss