Mr Potato Head Flash Game

Introduction

In this tutorial you will learn how to create a Mr Potato Head "drag'n'drop" flash game.

How To

  • Load up Flash and create a new Flash document
  • Create a movie-clip, place it on the stage, and give it a name in the properties panel. e.g. "ear"
  • Create an invisible button and place an instance of it inside your movie-clip
  • Make sure the invisible button is selected and open up the Actions Panel
  • Place the following script in the Actions Panel
on (press) {
startDrag(this);
}

on (release) {
stopDrag();
}
  • Come out of the movie-clip editor by clicking on Scene1, or by double clicking on the stage
  • Test your movie - Hey Presto!! - You should be able to drag and drop your movie clip around the stage.

In my Mr Potato Head example, the above principle was applied to all the other elements, e.g. legs, arms, nose - Easy!

A big thanks to Paul Woodward at TheStableRoom for supplying the graphics!

Downloads

Comments

  • Paul 17/07/2009, 15:22

    Hope you enjoy the game, and if you make any modifications or variations please post a link below.

  • Paulo 17/07/2009, 15:26

    Nice, good old drag and drop! Always useful.

  • Paul 17/07/2009, 15:31

    I'll be posting a Silverlight version of this demo very soon.

  • Al 17/07/2009, 16:24

    This is pretty sweet mate - actually that's damn sweet - could be used in so many different ways!

Add Comment

Learn

By Category