Join Paul Trani for an in-depth discussion in this video Subtracting lives and ending the game, part of Flash Professional CS5: Creating a Simple Game for Android Devices.
At this point in the development of the game, I have scoring hooked up, I have the…various levels, but I don't have the number of lives.…So what I want to do is I want to add a certain number of lives to the player,…and when the lives are at zero the game will end.…The lives will be subtracted when one of those UFOs reaches the very bottom, or…if a UFO actually hits the player.…So that's how you lose lives, and I think we'll start out with 2 lives initially.…
Okay, so let's take a look at this text field right here. It's on this…text layer. I just have those other layers turned off.…I have it selected, and you can see that its instance name is lives_txt.…Okay, so I want to initially give it some lives--two lives to begin with.…So let's go into the Actions panel with that first frame selected in the actions…layer, and let's scroll up to the top.…Just right up here at the top, this is where I'll set all my variables, and I want…to set another variable called lives, and it is going to be a number.…
- Designing for mobile platforms
- Creating and optimizing game graphics
- Adding random movement and interactivity
- Moving players based on the accelerometer
- Using gestures
- Detecting collisions
- Implementing audio
- Adding scoring and levels
- Implementing a high score screen
- Publishing an app on both Mac and Windows
- Uploading to the Android Market
Skill Level Intermediate
1. Introduction to Mobile
Understanding the user4m 2s
2. Mobile Game Setup
3. Basic Game Movement
4. Advanced Interactivity
6. Mobile-Specific Functionality
7. Optimizing for Mobile Devices
9. Uploading to the Android Market
Next steps1m 22s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.