Upcoming Events
Southwest Gaming Expo
11/20 - 11/22 @ Dallas, TX

Workshop on Network and Systems Support for Games (NetGames 2009)
11/23 - 11/25 @ Paris, France

ICIDS 2009 Interactive Storytelling
12/9 - 12/11 @ Guimarães, Portugal

Global Game Jam
1/29 - 1/31  

More events...


Quick Stats
6698 people currently visiting GDNet.
2341 articles in the reference section.

Help us fight cancer!
Join SETI Team GDNet!



Link to us

Link to us

  Intel sponsors gamedev.net search:   

Nintendo Wii Flash Game Creator's Guide: Chapter 5
Utilizing the Wii Remote: A Hammer Game


Exercise 5-1: Viewing the Flash File

Before you start writing the code to create the game, take a look at how the .FLA file is set up. I’ll also talk briefly about adding photos to a Flash application.

  1. In the exercise files, locate hammer.fla.
  2. Open the file in Flash and save it as hammer_{your name}.fla.
  3. Notice there are five layers: actions, hammer, wood, nail, and BG.
  4. Hide and unhide the layers to view the content on each layer. Notice that the layers contain some photos. Also notice the instance name of the hammer movie clip is hammer_mc, and the instance name of the nail is nail_mc.
  5. NOTE: You can import JPEG, GIF, or PNG files into Flash using File | Import | Import To Stage or File | Import | Import To Library. Once you import a bitmap graphic, that graphic is stored in your Library. To place the bitmap on the Stage, click and drag it from the Library, just like any other Library item. You can place a bitmap inside a movie clip or graphic symbol and animate it using motion tweens just as you would animate a movie clip or graphic symbol.

  6. Notice in the Library there are four bitmap graphics (photos) and two movie clips.
  7. Double-click the mcHammer movie clip symbol icon in the Library to enter its Timeline. If you expect to see an image of an early ’90s hip-hop star, you may be disappointed. On the Stage inside the mcHammer movie clip, you’ll see a bitmap graphic of a hammer. When you select the graphic, you will see a gray outline (as shown next), which is an indicator in Flash that you have a bitmap selected.
  8. View the nail movie clip in the Library by double-clicking the movie clip symbol for mcNail. Notice that this movie clip also contains a bitmap graphic.
  9. Click Scene 1 in the Timeline to return to the Main Timeline.
  10. Keep the file open for the next exercise.

Understanding Invisible Buttons

Invisible buttons are simply regular buttons with no up state. Sometimes, invisible buttons have over or down states, but typically invisible buttons only have a hit state. Invisible buttons are a handy tool in creating Wii games in Flash, because they allow you to add interactivity without adding any graphics.

You can create invisible buttons in Flash in a few ways. One way, which is the most common, is to draw the hit area of your button first. Then, you can convert it to a button symbol, and simply drag the Up state keyframe of the button to the Hit state keyframe. On the Stage, an invisible button has a semitransparent cyan color. The following illustration shows an invisible button on the stage.





Exercise 5-2


Contents
  Introduction
  Exercise 5-1
  Exercise 5-2
  Exercise 5-3
  Exercise 5-4
  Exercise 5-5

  Printable version
  Discuss this article