Join Paul Trani for an in-depth discussion in this video Adding code snippets, part of Flash Professional CS5: Creating a Simple Game for Android Devices.
- View Offline
One thing that will really help in development of any project in Flash will be to use the Code Snippets panel. If you go to Window, open up Code Snippets, notice that there are already these folders filled with all these great Action- Script code snippets that you can use in your project. And for this title and this game, what I'm going to do is I am going to go ahead and load in some code snippets that I already have prepared. And this Code Snippet file is available for free on the lynda.com web site, associated with this course.
So if you select the flyout menu, go to Import Code Snippets XML. And inside of the Assets folder, there's a Code Snippets folder, and just select MobileGame.xml. So with that file selected, click Open, and you can see that it loads in this new folder called Mobile Game, and it's filled with code snippets. Very powerful, and I can add any one of these easily, just by double-clicking on it.
As I do that, it adds that code snippet to the Actions layer in my Timeline. Okay, so I have just added this ActionScript code snippet. I'll just delete that because, again, I don't need it right now. But really using the Code Snippets panel it's as simple as adding the code snippet and customizing it specifically for your use. But I'd say Flash Professional CS5 is all set up, and I am actually to further the development of this game.
- 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