Computer Tech 1 Lesson

  • Computer Tech 1
  • Digital Filmmaking
  • Vox Communications
  • Contact Me

Standard for this lesson:

Know the tools needed to enable multimedia capabilities (animated images) for Web sites.

Learning Target: I can deliver multimedia presentations and understand the fundamentals of programming.

    Making Shapes Draggable




    n this lesson you will learn to make your shape draggable. The user will be able to click and drag your shape anywhere across the screen. A lot of Flash games use this principle. You can do things like change a figures clothes, make puzzles, even build cities and structures.

    Check out this example. Click on the guy and move him about with your mouse.

    Here are some more examples:

    Make A Disguise.

    And another example:

    The Hat Guy.

    1. Start a new ACTIONSCRIPT 2.0 Project.

    2. Start by drawing your starting shape. In my case it is the drawing of a face.

    3. Convert it to a graphic symbol and lock the layer.The face itself is not going to drag, so we don't need to worry about programming it.

    4. Add a new layer and name it whatever your draggable shape will be. Let's say "hair."

    5. Draw a hairpiece over the head so that it lines up correctly with the scalp.

    6.Convert the hairpiece to a Movieclip symbol.First, select the shape and then: Insert -> Convert to Symbol -> Movieclip.

    7. Name your symbol so you will remember what it is.

    8.Make sure the Movieclip is selected, open up the ACTIONS window. WINDOWS > ACTION.

    14.You will see that the ActionScript window will be open. Copy and past this sample code into the ActionScript window:

    Click on this link to get the code:
    Sample code

    15.Test your movie to see if the drag feature is working.

    Video of How to Do Draggable Shapes

    Assignment

    Make your own draggable shapes project using at least 5 draggable movieclips. Examples: a puzzle, a figure with costumes, a face with features, an apartment with furniture, a building.

    Repeat the process so that you have completed a total of three draggable shapes projects.