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.
Let's start off by creating our very first Flash file. Now, I am going to be going to be using Adobe Flash CS5 throughout this course, but I'm actually not going to start there. I'm actually going to create a file using Adobe Device Central CS5. Okay, so with Device Central CS5, it allows me to sort of create my very first file, add content to it, and then I can test that content to see how it looks and interacts back in Device Central.
But again, I am going to use this as my starting point, so I am just going to go ahead and launch Device Central. Now, the first thing I am going to do is I am going to browse the various devices. So, as you'll notice, this is a great place to kind of peruse all the various devices out there. You can see the different display sizes, the creator, Flash content. This is Flash in the browser. Or you can just view by name. But what I want to do is I want to search for all the Droid devices, so I am just going to go ahead and type in Droid and that brings up all of these Droid devices.
So I am going to just select by holding down the Command key, or Ctrl key if you're on a PC. I'm selecting these three, because really these three devices--the Droid Incredible, the Droid 2 and the Droid X-- are the three devices that I want to test on. So I am going to take those three and just click and drag them over into the Test Devices folder off to the side. Okay, just like that. Notice I can check out any of the specifics of each device just by selecting it, and it gives me the color depth, all sorts of things, right in here, or I can select it on the side as well.
So if I go to the Droid 2, I can see that its display size is 854 x 480, and I'm given all the other details. But as you'll notice, the display size is pretty similar across these devices. So I am just going to start by selecting the Droid 2 and from this profile, I am going to go ahead and create--that's in the upper right-hand corner--a Flash file based on the Droid 2 specs.
Before I click Create, I need to make sure I set to full screen, okay, so that's going to make sure my document is the full screen of the device as well. It's the same size, which is going to be 854 x 480. I'll click Create. So that ensures that your document is the correct size. As I look in the Properties panel, 854 x 480, I can see the stage color as well. Okay, so I am just going to ahead and draw a quick rectangle with the Rectangle tool, and this is basically just a throwaway file, so don't worry about the color or anything else, because all I want to do is just draw a quick graphic, go to Control, and then test it back in Device Central.
So, again, the creation of your graphics, everything you need to do, and then you can test it back in Device Central, just like that. You will get this gray bar sometimes, and in order to get rid of that, go to the Display panel and make sure this is set to Fullscreen, because what's going on here is Device Central thinks you want to see this in a browser, so it's accounting for the browser bar. So it's set to Fullscreen. There is my content. I can see how that looks, and I actually can do more interaction, which we'll cover later.
So that's a quick preview of how to make a profile, as well as--based on that profile--make a quick Flash file and then test out your graphics. Now if I go back into Flash, here's a file that I already have created. So if you could imagine I've created all of these graphics, I want to test these actual graphics out on the device. I can go to Control > Test Movie, again in Device Central. That's what I've been using. I can go to Test, and there's the graphics.
So again, this one has some animation. I can see the graphics. Everything looks pretty good. I can make sure this is set to Fullscreen, but let's take this a step farther because using the Display panel, I want to change the Reflections to, say for instance, Indoor to see how the graphics hold up. Okay. So, so far so good. We get a little bit of a reflection. Outdoor. You can start to stimulate these different environments. And then what you want to do is adjust your graphics accordingly, okay.
Same thing for, say for instance, Screen mode; I can change it from landscape to portrait and see what that looks like there. Notice how the content shifts, but this simulates how the content would look if they change the Screen mode, basically the orientation. Not only that, I did say I wanted to see how this looks on other devices. Well, I can always select this Motorola Droid X. I double-click on that. I can see that, and I can also change it to landscape and there's the Droid X with the graphics, and I can change the Reflections back to None.
So again, Device Central gives you the ability to not only create your first file, but it enables you to view those graphics not only on the, say for instance, the profile that you've created the file on originally, but on different devices as well. So this is a great starting point for making your first Flash file.
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.