Viewers: in countries Watching now:
In Flash Professional CS5: Creating a Simple Game for Android Devices, author Paul Trani shows how to translate existing Flash skills from the web to mobile devices while designing a game in Flash and publishing it as an AIR for Android app. The finished application includes collision detection, random enemy creation and movement, shooting capabilities, multiple levels, and even a high score screen. This course also goes beyond game functionality and shows how to use mobile capabilities such as the accelerometer and gestures to control graphics, use the hardware keys to activate menus, and also how to optimize content so it plays well on mobile devices. Also included are instructions for distributing an app through the Android Market. Exercise files are included with the course.
Once you have all of your files that you need for your app, the next step is going to be taking all of these files and packaging them up into an APK file, which is the format of a mobile application for Android devices. And in order to do that, what I'm going to use is the AIR SDK. So if you go to adobe.com/products/error/sdk, you can go ahead and download it. Now the key tool I am going to use here is this Adobe AIR Developer tool.
From the command line, I am going to go ahead and use this Adobe AIR Developer tool, ADT. So, just go ahead and download it. I've actually already downloaded it. You can see it right here. And I'll just unzip this file, and here's the Adobe AIR SDK. I am going to go ahead and drag this onto my Desktop, and I am going to place it right there, and I am going to close this folder. So, what I want to do is with this AIR SDK, inside of this bin folder is where this ADT file is.
This is actually an executable. And I want to run this adt executable and use it to basically package up all these elements into an APK. And I am going to do that using the command line. So, on a Mac, just go ahead and hit the Search button and search for Terminal. As soon as it's selected, you can go ahead and hit Enter. It is in your Applications folder. And I am just going to go ahead and increase this font just by hitting Command+Plus, because I am going to go ahead and use this to target that ADT file, as well as these files.
So, the first thing I need to do is point to my Desktop. So I need to say the current directory, cd desktop, and I want to point inside of that AdobeAIRSDK folder/bin into this folder right here, because I want to really get to this ADT file. And really, to make this even easier on me, what I can do, and I encourage you to just take all of these files, the icons, xml, certification, and just drag them into that same bin folder.
That's just going to mean that I have less to type in here. All right, so that's the folder I am targeting. That's going to be the current directory. That's what it is known as, the cd. Now, I want to go ahead and use adt to package up those files. So I'm going to say ./adt, which is in that folder. I want to package and target an APK file. The storetype is going to be pkcs12, and keystore is also what I need, because I need to go ahead and use that mycert.p12, and notice how it is right here in mycertp12.
Okay, so I'm not including that certification file, which I need. The next thing I am going to do is I am going to go ahead and give this APK file a name, and I am just going to call Invaders.apk. And within that Invaders.apk, this assigned Invaders.apk file, it's going to have the Invaders-app.xml, this xml file. You can see right here. And then it's also going to have the Invaders-swf file.
Now, if you remember, this XML file actually does point to these PNG files. So, if there's any reference to any external graphic, you need to make sure you include that in here as well. And that's the case with these icons, so icon48, icon72, and icon36.png. All right, so this needs to be exact, so go through and make sure there are no spaces. Make sure the capitalizations are appropriate.
And if everything is set up correctly, all you need to do is you hit Enter, and it will ask you for the password when you first created this p12 file. So I will enter that in, and then it goes through and creates an APK file. So, as I scroll down, you can see here's the Invaders.apk file. So again, as long as you have the Adobe AIR SDK, you can access this ADT file, which you can use using the command line to package up all these files to make an APK.
So really, the next step is to take this APK and put it on an actual device.
There are currently no FAQs about Flash Professional CS5: Creating a Simple Game for Android Devices.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.