Flash: Making a Paperdoll
- To make a Flash paperdoll, we'll be making a collection of
buttons. This is a very simple program which will help you get more
familiar with ActionScript syntax and with working in Flash.
- First, create a button in Flash that will be the
paperdoll. To do this, click on Insert - New Symbol - Button. Design
the button, and then click on Scene 1, and drag and drop the paperdoll
button into Scene 1 from your Library.
-
In Scene 1, add another layer. This layer will be used for all of the
paperdoll clothes, or features that will go on top of the paperdoll.
- Now, create another button that will be the first piece of
paperdoll clothing using the same steps you used to make the paperdoll
button, but this time make sure to drag the button from your library
into layer 2 instead of layer 1.
- Now, you should have two buttons on separate layers on the
scene. Click on the second button, which is the item of clothing, and
bring up the actions window. The completed code here will be:
on (press) {
startDrag ("");
}
on (release) {
stopDrag ();
}
In the actions window, click on the "onMouseEvent" button on the
left. Then, select the press box, and then click on startDrag from the
side left. Then, click on "onMouseEvent" from the left, and select
release in the check box. Next, click on the stopDrag from the
left. Now, you have all the code needed, so test your movie using
Control- Test Movie.
Now, add the same code to the paperdoll so it can be moved around
the screen, and add more buttons with the above code for additional
clothing items.
Here's one example of a finalized working Flash Paperdoll, and here's the .fla file.
Back