Join Paul Trani for an in-depth discussion in this video Handling activation and deactivation, part of Flash Professional CS5: Creating a Simple Game for Android Devices.
Since this is a game for mobile devices, what we need to do is figure out how to…handle the game, say for instance, when the user gets a phone call, or when the…user launches another app.…So we need to handle this activation and deactivation of this game, and I'm going…to do that by using the Code Snippets panel. Down here there is App…Activate/Deactivate.…So I'm going to go ahead and that to that frame on my Actions layer where all my…other code is, right in here.…
So there's a couple of EventListeners right in here. So the first one is going…to listen for the deactivate, so anytime you know, say for instance, when the user…gets a phone call or launches another app, and this app is actually basically in…background mode. What we do with everything?…Well, what we do with that information is we're going to go ahead and pause the…game anytime the game is deactivated or running in the background.…
We want to pause it because not only do we not want the game to continue to play…and watch our players die without us knowing it, but we also don't want to tax…
- 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.