How to Make Flash Dress-Up Games

Making a Flash dress-up video game will help you improve the way you dress and look. And that's because you can make yourself the model and you can choose your own clothes. Making a Flash dress-up game requires that you know how to import flash compatible pictures and resize graphics. Making the most out of your game will require some simple Flash code so you can put new clothes on and takes old clothes off.

Things You'll Need

  • Adobe Flash Professional (CS3, CS4 or CS5 versions)
  • JPEG computer graphic file of yourself
  • JPEG computer graphic file of a dress
Show More

Instructions

  1. Preparation

    • 1

      Click the "File" menu from the main Flash menu bar. Click the "Import" menu option from the "File" menu and then click the "Import to Stage" option from the "Import" menu. Click the "jpeg" graphic file of yourself named "beautifulme.jpg" from the file dialog box that appears.. Click the "Open" button on the dialog box to import this graphic file to the Flash stage.

    • 2

      Click on the graphic image that appears on the stage. Select the "Properties" option from the "Window" menu to display the "Properties" panel. Write down the width and height that are in the "w" and "h" text boxes in the "Properties" panel. Position your mouse cursor within the "w" box and type in a new width in pixels. Divide the new width by the width you wrote down. Multiply this result by the height value you wrote down. Type the result in the "h" box to ensure that the width and height are scaled in the same proportion.

    • 3

      Import and scale jpg graphic of your dress in the same way as in the last step. Drag the dress with your mouse so it is about 2 inches below the picture of yourself.

    • 4

      Select the "Convert to Symbol" option from the "Modify" menu Check the "Export for ActionScript" box, than click the "OK" button in the "Symbol" dialog box that appears.

    • 5

      Position your cursor in the :"Instance Name" text box in the "Properties" menu. Enter "mydress" into the "Instance Name" text box for the dress graphic.

    Coding Interactivity

    • 6
      Make your dresses move up with keyboard interactive code

      Select "Actions" from the "Window" menu to open the Actions editor.

    • 7

      Type the code below in the first line of the Actions editor to instruct Flash to detect if a key on your keyboard has been pressed down,.

      stage.addEventListener(KeyboardEvent,KEY_DOWN, whichKey)

    • 8

      Type the code statements below in the next three lines of the Actions editor to instruct Flash to move the dress up 10 pixels when the "Up Arrow" key on the keyboard has been pressed.

      function whichKey(event:KeyboardEvent):

      void

      {if (event.keyCode == Keyboard.UP){mydress.y = mydress.y + 10}}

    • 9

      Paste or type the code below into the "Actions" editor if you have not already typed it in. Click the "TestMovie" option from the "Control" option on the Flash main menu bar. Press the "Up Arrow" key on your keyboard when the movie plays to move the dress up 10 pixels.

      stage.addEventListener(KeyboardEvent.KEY_DOWN, whichKey)

      function whichKey(event:KeyboardEvent):

      void

      {if (event.keyCode == Keyboard.UP){mydress.y = mydress.y + 10}}

Learnify Hub © www.0685.com All Rights Reserved