Tag Archives: Actionscript

Searching for Truth at the Flash Gaming Summit

i’ve been thrilled to be involved with the Flash Gaming Summit for the past number of years, as a delegate, a moderator, and a speaker. The conference, which conveniently takes place in San Francisco the day before the GDC summits, is filled with people i consider sister sufferers in a very particular (and increasingly beleaguered) pocket of game development.

Flash! / Aaah-aaahh / Saviour of the universe (?)

Many of the FGS delegates are folks who started their careers building web games with (then) Macromedia Flash, and who have come through the fire of learning how to earn a living with the software with help from distributors like MochiMedia, Flash Game License, NewGrounds and and Kongregate, and portal-owning publishers who are willing to pay license fees for the games, hoping that they’ll make it back in ad revenue on their sites. Some of the people you meet at Flash Gaming Summit are the people who have become successful enough to afford a plane ticket to San Francisco which, considering their often humble beginnings, is really saying something. And a good number of the delegates are from studios who evaluated Flash and decided that it was a good technological fit for their platform or business strategy.

It’s not unusual to find industry visionaries like Dan Cook of SpryFox (Triple Town, Leap Day) milling around during the Summit.

This is a time of uncertainty for devs like Untold Entertainment who largely earn their living making games with Adobe Flash. For many of us, the uncertainty is over why there’s so much hype for vastly inferior technologies like HTML5, and why we’re being pressured by the market to adopt far more expensive tools like Unity to do the same work we’re already comfortable and proficient at doing with Flash?

The Flash platform was dealt a major blow when Steve Jobs – for somewhat vindictive business reasons, thinly veiled as technological snobbery – declared that Flash content would not be supported in any iPhone browser, and then dropped the mic and left the stage (in more ways than one). To this day, the myth persists that you can’t develop any content for iOS using Flash. The opposite is in fact true: many devs like Untold are happily wrapping their Flash creations with Adobe AIR and creating successful native apps for Apple’s devices.

Sissy’s Magical Ponycorn Adventure, which is on sale on the iPad this week, was developed in Flash.

Real Talk with Ryan Creighton

In an effort to get down to the bottom of things, i’ll be moderating a panel at FGS this year asking the hard questions: is Adobe Flash worth sticking with, or is it time to jump ship? Cutting through the hype, what are the advantages and disadvantages of competing technologies, and what would it take to transition a shop to start using them? And is it even worth it? What do Adobe’s recent announcements about Actionscript Next and abolishing the “speed tax” reveal about the company’s plans for the platform? All these questions and more will be discussed, in amongst a line-up of talks and panels by some of the biggest players in this corner of game development.

Enter the special promo code blog_UntoldEnt for a 15% discount when you register for your Flash Gaming Summit pass. See you all in March!

Untold Entertainment Fall Internship Program 2012

Untold Entertainment is a boutique game development studio in downtown Toronto. We specialize in games and apps for kids, teens, tweens and preschoolers. We’re looking for two interns for the months of October – December 2012:

  • a 2d artist/animator
  • an Actionscript 3 programmer

Deadline

Please submit your application (see below) by Friday October 12, 2012 at 9:17 PM Eastern Standard Time.

Eligibility

Ideal candidates will be hungry for experience and committed to producing quality products. These are attributes we’ve prized in past interns:

  • Self-starter. Take initiative and produce work effectively and on time.
  • Team player. Collaborate and communicate openly with team members, act on constructive criticism and constantly do what’s best for the project and your team.
  • Detail oriented. Be your own toughest critic and focus on delivering your work with as much detail and care as possible.
  • Problem solver. Be prepared to think outside the box and find solutions to challenges that may appear.
  • Life-long Learner. See every fork in the road as a way to expand your skillset and continuously strive to improve at what you do.
  • Positive attitude. No whining. Move forward and get things done!
  • Humorist. Anyone caught wearing a suit will be shot.

What Will You Be Doing?

Here are the major tasks you will be performing at Untold Entertainment (other related tasks may crop up as projects call for them):

  • Programming. Laying down code in Actionscript 3 for Flash-based projects based on design documentation.

    OR

  • Art and animation. Designing, creating, and animating 2D characters, backgrounds, and other visual effects according to project specifications.

    AND

  • Collaborating. Working with a small team to ensure deadlines are met with an end product worthy to carry the name Untold Entertainment.
  • Testing. Providing quality assurance for various game projects that you have helped create.
  • Coffee machine repair. Seriously, how is this thing still broken?

How Much Do i Get Paid?

This is an unpaid internship. It is an opportunity to gain great experience and to put some real game development studio work on your resume, along with the chance to get your name in the credits of a shipped title. Many former interns have remarked that they understand the business of game development and the entrepreneurial side of the industry much better after completing their internship at Untold Entertainment. Working at a small studio is a far different experience from working at a big triple-A juggernaut. As an additional perk, we offer No-Pants Fridays.

How Do I Apply?

Email info [the curly at sign] untoldentertainment [the little dot thingy] com. Please put way more attention into an interesting email and samples of your work than your resume. Give us a sense of your personality, and why you think you’re a good fit. Cookie-cutter applications with business-suit-wearing cover-letters and resumes describing your evening shift at Shopper’s Drug Mart will be stabbed and burned.
Successful candidates will be contacted for interviews in early to mid-October.

Is It Worth It?

Here’s what some former interns have to say about their experience:

Having had no idea what to expect from my summer internship, and, more importantly, my first real studio experience, I was greatly relieved to land a job at Untold Entertainment with programmer, animator, teacher, comedian, lion-tamer, and self-made astronaut, Ryan Creighton. I was provided with a bounty of knowledge, a plethora of fun tasks to sink my artistic teeth into, and the respect to freely give and receive feedback on projects. Not only did working at Untold open my eyes to new possibilities, give me an opportunity to expand my skill set, and introduce me to a number of lovely people currently working throughout the entertainment and game development industries, but there was also a steady supply of candy, and occasionally we were rewarded with tacos. Untold is a brilliant studio with a clever, innovative, and genuine captain at the helm. 10/10, would intern again.

- Intern Sarah Davis, Summer 2012

I couldn’t have possibly broken into the game industry with what they taught me in school alone – It definitely takes a lot more than a strong 3D modelling portfolio. Ryan Creighton taught me the real value of hard work, imagination and a positive attitude. Oh, and that “Nordic Berries” are DEFINITELY not a suitable substitute for Swedish Berries.

- Intern Chewie (Cassandra Chui), Winter 2012

Also, pants required.

- Intern Sina Kashanizadeh, Fall 2011

I learned more about making games at Untold than I ever did at school.

- Intern Cale Bradbury, Academic year 2010-2011

The stuff I learned from Ryan is the stuff I’m currently getting paid for in California. The effort to reward ratio is incredible.

- Intern Mohammed Al-Sahaf, Winter 2011

Want to play games all day? Go home and play. Want to discover the stress, struggle, and ultimate satisfaction of making games for a living? Apply for this internship.

- Intern David S. Gallant, Fall 2011

Working with Ryan Creighton has been eye-opening. If Untold had taught me anything as an intern, it’s open your mind to new creative ideas.

- Intern Chris Aaron Broadfield, Summer 2011

Flash to iOS: A Step-by-Step Tutorial (Part 5)

Flash to iOS: A Step-by-Step Tutorial

This is the fifth part of our tutorial series by Intern Sina on creating an AIR application for free on a PC using FlashDevelop, and deploying it as a native app on an iOS device like the Apple iPad, iPhone or iPod Touch.

Jump to other parts in the series:

Distribution Certificate

Now that you’ve tested your app and it’s to your liking, guess you want to put it up on the App Store? Never fear, my friend! I will now show you how to get your app uploaded on the App Store so the whole world can ignore it and buy Angry Birds instead.

This process of distribution is a bittersweet one. It’s sweet because it’s extremely similar to the development process that you just went through, so you should be familiar with the convoluted certificates and hoops you have to jump through at Apple’s pleasure. It’s bitter because it’s extremely similar to the development process that you just went through.

Groundhog Day

Something about this seems awfully familiar …

Enough talk. Let’s get cracking!

Generate a Signing Certificate Request

Remember that OpenSSL program that you installed in Part 2 of this tutorial? You have to open that bad boy up again to create another Certificate Signing Request. Now, it is possible to just use your old Signing Certificate – however, just to be super clear and to avoid any confusion or difficulty, we’re going to create another one.

Note: We’ll use this new Signing Certificate Request to get a Distribution Certificate rather than a Development Certificate.

  1. Open a command prompt window. You can do this by clicking the Windows Start button and typing in cmd in the search field. Alternately, you can also hold the Windows key on your keyboard and hit the “R” key (for “Run”), then type cmd and hit Enter.

    Windows CLI

  2. Once you are in the command prompt, navigate to your Open SSL bin folder. Depending on where you installed it, you will have to navigate to a different path than in this example. (i hope you installed Open SSL in a location that you can remember!) Check Part 2 if you need a refresher on Windows CLI (Command Line Interpreter) commands.

    Open SSL folder

  3. Punch this command into the CLI and hit the ENTER key when you’re finished:
    openssl genrsa -out mykey.key 2048

    You should see this response:

    Response

  4. Next, type (or highlight the line, right-click, choose “Copy”, and right-click/”Paste” in the CLI):
    openssl req -new -key mykey.key -out CertificateSigningRequest.certSigningRequest  -subj "/emailAddress=yourAddress@example.com, CN=John Doe, C=US"

    Now, before you hit ENTER you’ll want to edit a couple of things. First, replace “John Doe” with your own name or company name. Then replace the “yourAddress@example.com” email with your own email. Press ENTER.

    You should get a message similar to this:

    Response 2

    You just generated the Signing Certificate Request file that you’ll use to ask Apple for your Distribution Signing Certificate. The Signing Certificate Request file is located in the bin folder of your Open SSL install. It has a .certSigningRequest file extension and should look like this:

    Signing Certificate

Obtain a Signing Certificate for Distribution

You have to upload your Signing Certificate Request file to the Apple Provisioning Portal to get your Distribution Signing Certificate. Onward.

Note: There have been instances where this upload does not work with Google Chrome. Just to be safe, use another browser like Firefox.

  1. Navigate to the Apple iOS Provisioning Portal within the Dev Center.

    Apple Provisioning Portal

  2. Log in with your developer account and click on Certificates.
  3. Click on the Distribution tab.

    Apple Provisioning Portal

    Note: In our previous tutorials, you requested a certificate from the Development tab. An app signed with a Development certificate cannot be successfully submitted to the Apple App Store.

    If you have an old Distribution Certificate because you’ve made a prior app, and you’d still like to follow along, you can go ahead and Revoke it. Revoking the Certificate will not affect your apps that are already on the App Store, because the Certificate is primarily used during the upload process so that Apple can identify you.

    Note: I recommend revoking an existing Certificate because Apple seems to issue only one Certificate per Team Agent. You must revoke any existing Certificate to be able to request another. Why is it set up like this? I have no idea.

    Revoke your Apple Signing Certificate

  4. If you don’t have a pre-existing Distribution Signing Certificate, you can just go ahead and click Request Certificate.

    Request your Apple Signing Certificate

    On the next screen, you will upload the Signing Certificate Request file that you generated in the previous section.

    Request

  5. Click the Browse button and navigate to the OpenSSL bin folder.
  6. Select the Signing Certificate Request file and click Submit. When you are finished, you’ll see your Distribution Signing Certificate ready to download from the web page.

    Your Apple Signing Certificate

Don’t download your Distribution Certificate quite yet. You still need to create an App ID and a Mobile Provisioning Profile.

Create a New App ID

When deciding what you want your App ID to be, you have two choices:

  • Create an entirely new App ID
  • Use the Existing App ID that you create in Part 2

If you want to use your existing App ID, then just skip to the next section. If for some reason you don’t like the name of your App ID, go ahead and make a new App ID, following the steps outlined in Part 2.

Create a Mobile Provisioning Profile for Distribution

Now that you have an App ID, you can create your Mobile Provisioning Profile.

  1. Within the Provisioning Portal website, click Provisioning in the sidebar.
  2. Click the Distribution tab.

    New Provisioning Profile

    In previous tutorials, you created a Development profile for testing. You won’t be able to upload your app to the Apple App Store unless you create a Distribution profile, so make sure you select the correct tab.

    You can either create a new Provisioning Profile, or modify an existing one. Modifying an existing profile if you want to switch between App Store and Ad Hoc distribution. If you’ve never created a Distribution profile, read on. Instructions for modifying a profile are in the section following.

  3. Click on New Profile.

    New Provisioning Profile Button

    Note: You’ll only see this option if you are the fee-paying Team Admin.

  4. In the next section, you’ll have to fill out a bunch of options. The first option is the Distribution Method. As you can see, you can choose between App Store and Ad Hoc.
    • Choose App Store if you are completely satisfied with your app and you want to submit it to Apple for review. If all goes well, then your app will be released whenever Apple deems it worthy.
    • The Ad Hoc option can be thought of as a closed beta for your app. When you choose Ad Hoc, you are able to release your app to a maximum of 100 people, and only they will have access to it. Your App will NOT appear in the public App Store if you choose Ad Hoc.

    Note: Notice when you choose App Store, the “Devices” option is greyed out. When you choose Ad Hoc, it allows you to choose a number of devices that you have registered. The App Store option releases your app on the public App Store, so it doesn’t make sense to target specific devices.

  5. Your Profile Name is the name that you want for your Provisioning Profile. The Distribution Certificate that you created should be visible here.
  6. Finally, you have to choose which App ID with which you want to register your Provisioning Profile.

    Profile Options

  7. Click Submit.
  8. You should ee a list of the Provisioning Profiles that you’ve created. Click download on the Provisioning Profile that you just created, and save it to you computer.

    Save Your Provisioning Profile

Modify your Provisioning Profile

Note: If you’re not modifying an existing Provisioning Profile (say, from Ad Hoc to App Store), skip over this section.

  1. Within the Provisioning Portal website, click Provisioning in the sidebar.
  2. Click the Distribution tab.

    New Provisioning Profile

  3. Click Modify on the Provisioning Profile that you want to reuse.

    Modify Provisioning Profile

  4. Switch to either Ad Hoc or App Store. The distinction between these two options is explained in the preceding section.

    Edit Provisioning Profile

  5. Click Submit.
  6. You should see a list of the Provisioning Profiles that you’ve created. Click download on the Provisioning Profile that you just modified, and save it to your computer.

    Save Your Provisioning Profile

Download your Distribution Certificate

You just need to download the Distribution Signing Certificate that you created at the top of this tutorial, and then you are ready to bundle your .ipa file to submit to the App Store.

  1. Click on the Certificates section in the sidebar.
  2. Click the Distribution tab.

    Apple Provisioning Portal

  3. You’ll see that your Distribution Signing Certificate is ready to download. You can also see that it contains the Distribution Provisioning Profile that you just made.

    Your Certificate is Ready

  • Click download and save the file to your computer. Just to make things easier, you can save that certificate in the Open SSL bin folder, where your Certificate Signing Request file is sitting.

    Hooray!

    Note: Make sure not to get confused between your Development Certificate and Profile, and your Distribution Certificate and Profile. You won’t be able to upload your app to the App Store if you accidentally use the Distribution set of certs in these next steps.

    Convert the Signing Certificate to a .p12 File

    You’ll have to perform the .p12 conversion on your Certificate again, as you did in an earlier tutorial. Here are the steps:

    1. Open up your command prompt.
    2. Navigate to your Open SSL bin folder.
    3. Copy and paste this command:
      openssl x509 -in distribution_identity.cer -inform DER -out distribution_identity.pem -outform PEM

      After you enter that command, you’ll see a .pem file show up in your OpenSSL bin folder.

      .pem file

    4. Copy and paste this command in the CLI:
      openssl pkcs12 -export -inkey mykey.key -in distribution_identity.pem -out iphone_dev.p12

      Note: These are the exact same commands that you used for our Development Certificate in an earlier tutorial, except that the file name has been changed from “development” to “distribution”.

    5. After you punch in the command, enter a password and then verify that password. Make sure the password is something that you will remember. (Save it in a .txt file! – Ed.)

      Note: Remember that you may get an error mentioning a “random state”. Just type in the command set RANDFILE=.rnd and it should fix the problem for you.

    6. Navigate to the bin folder in your Open SSL directory and you should see your .p12 file. Hooray!

      .p12 file

    Hello, Planet

    As we mentioned off the top, much of this is familiar territory. With all of your Distribution certs sorted out, you’re ready to bundle up your final .ipa file and foist it onto an unsuspecting public. In the next tutorial, you’ll follow familiar instructions to bind your certs to your .ipa, and experience that magical moment of uploading your app for Apple’s approval (followed shortly by that equally magical moment of getting your app rejected cuz BEWBZ.) Let’s do it!

  • Flash to iOS: A Step-by-Step Tutorial (Part 4)

    Flash to iOS: A Step-by-Step Tutorial

    This is the fourth part of our tutorial series by Intern Sina on creating an AIR application for free on a PC using FlashDevelop, and deploying it as a native app on an iOS device like the Apple iPad, iPhone or iPod Touch.

    Jump to other parts in the series:

    In this section of the tutorial, the rubber meets the road. You’ll make all the finicky adjustments to FlashDevelop and the AIR bundling files to get your Hello Planet app up and running on your testing device.

    Point FlashDevelop to the Merged SDK Folder

    Now that your (cr)app is successfully up and running, you have to make a few tweaks and adjustments to FlashDevelop. You’ll start by telling FlashDevelop all about that merged SDK folder you created in Part 3.

    1. In the Project panel on the right, you’ll see a file called AIR_iOS_readme.txt. Double click that file to open it.

      This txt file lists a number of settings needed to get your ipa file working. The ipa file is the Holy Grail- the native app file that you’ll send to your testing device to see everything working properly. A window pops up with a bunch of options.

    2. Click the Project Properties button at the top of the Properties Panel (alternately, you can use the menus to navigate to Project>Properties).

      FlashDevelop Project Properties

    3. Change the version of your AIR SDK from 2.7 to 3.0 because (at the time of this writing), that is the latest version.

      FlashDevelop Project Properties Options

    4. Click on the SDK tab, and click Manage.

      FlashDevelop Project Properties Options - Manage

    5. On the next screen you will see list of installed Flex SDKs. Click the ellipsis (…) button at the end of that line. An InstalledSDK Collection Editor window pops up.

      FlashDevelop Project Properties Options - Flex SDK Location

    6. You’re going to point FlashDevelop to the location of our recently-downloaded Flex SDK (the same folder that contains both the Flex SDK and AIR SDK that you created earlier in this tutorial). First click the Add button, and then click on the Path line to get another ellipsis. Click on THAT ellipsis to browse your computer.

      Add

    7. Once you have clicked the ellipsis button, a Windows File Browser appears. Navigate to the merged SDK directory. Select that folder and click OK.

      Navigate to your merged SDK folder

    8. Click OK again to exit the InstalledSDK Collection Editor window.
    9. Click Close.
    10. In the drop-down menu, you should see the Default option. Click on the drop-down list and choose the SDK location you just told FlashDevelop about.

      Choose your Merged SDK profile from the drop-down menu.

    11. Click Apply.
    12. Click OK. Voila! Your SDK is now setup for your FlashDevelop Project.

      Let’s just test it out quickly to see if it works. The code you pasted in the previous tutorial prints out the words “Hello Planet” within your app. Well, I’m going to change mine to say “Sina is Cool”, just because I can, and also because I AM COOL. (You may be tempted to replace “Sina” with your own name. Please don’t, because uh … your code won’t work.)

      Your resulting app should look like this:

      Breaking: Sina is cool.

      A beautiful sight, isn’t it?

      (At this point, Sina actually is pretty damned cool. – Ed.)

    Delete the Extra Icons Folder

    Now you have FlashDevelop set up to create mobile-formatted AIR apps. Your app compiles, and you have your Mobile Provisioning Profile and your .p12 Signing Certificate waiting in the wings. All you need to do is combine all these amazing files together to create the Holy Grail .ipa file.

    The .ipa file is the Holy Grail of this tutorial series

    Ah – this is truly the .ipa of a FlashDeveloper.

    An .ipa file is like the program file – the Windows executable (.exe) – that you need to test your iPhone/iPad App on a device, and ultimately upload it to the Apple App Store.

    The creators of FlashDevelop 4 made a minor error when they created the Mobile App template: the template generates a duplicate icons folder that will cause a conflict when you try to bundle your .ipa file. You need to get rid of this extra folder to make sure your .ipa file to builds properly.

    1. Look in the right sidebar that lists your files and folders. You’ll see a folder called bin. (This is one of the folders that FlashDevelop created for you automatically when you created your project.)
    2. Click on the little plus sign beside the bin folder to expand it. You will see a folder called icons tucked inside. Right-click the icons folder and click Delete. Problem solved.

      Delete the icons folder to avoid a conflict later

    Integrate Your Cert Files

  • Copy your Mobile Provisioning Profile and your .p12 Signing Certificate into the certs folder of your project. If you’ve been following along with this tutorial from the beginning, you probably saved these two files in the bin folder of your OpenSSL install.

    Once the files are in the right place, they should show up in your Project sidebar:

    You put yer WEED in there.

    To create the .ipa, you have to edit a couple of lines in a batch file so that the app compiles properly. Don’t be scared: a batch file (.bat) is simply a text file that runs a script when you double-click it in Windows. You can open up a batch file by using a text editor of any kind. Since you’ve already got FlashDevelop open, it makes a lot of sense to use it to edit the batch files.

    In the following screenshot, I’ve opened up the ReadMe file that describes the iOS compilation steps. Step 5 talks about editing a batch file. Take a read if you’re nervous.

    iOS compilation readme

  • In the sidebar, find the bat folder and expand it.
  • Double-click the SetupApplication.bat file. The file should open in FlashDevelop.
  • In the batch file, you should see some green text that says ios packaging, and a bunch of set options beneath it. This is where you have to add or adjust some text. In the IOS_DEV_CERT_FILE line, type the path to your .p12 Signing Certificate file (the one you just copied into the certs folder). You only have to use a relative path (one that describes where the file is in relation to the compilation target), so just copy what I have and you should be fine:
    cert\iphone_dev.p12
    
  • In the IOS_DEV_CERT_PASS line, you have to enter password that you set when you made your Signing Certificate. (Don’t come crying to me if you don’t remember it – i told you to write it down – Ed.)
  • In the IOS_PROVISION line, type the name of your Mobile Provisioning Profile.

    All in all your SetupApplication.bat should look like this:

    SetupApplication.bat

    Note: Make sure you have the path properly setup as well as the same exact filename. If you have any sort of typo, it’s not going to work.

    Get Your Ducks in a Row

    You’re almost there! All you have to do is edit the SetupSDK.bat file.

    1. Double-click the SetupSDK.bat file to open it in FlashDevelop.
    2. At the top of the file, you’ll see a line that says path to Flex SDK in green. Right under that line is the path to the SDK. However, it’s not pointing to the merged SDK folder that we created earlier. Replace the default path with the path to your merged SDK folder. It might look similar to this:

      SetupSDK.bat

      Note: Remember to save often!

    3. Open the application.xml file. This xml file is the descriptor file for your application. You have to double-check to ensure everything in there is correct. Everything from your App name to the version of your App is located in this file.

      Application.xml

    4. Change the version number at the end of the xmlns parameter of the root application node to the version of AIR you’re running. In this case (and at the time of this writing), it’s 3.0.
    5. In the id node, enter the package name that you created for your Mobile Provisioning Profile.

      Application.xml changes

      If you don’t remember what your Bundle ID was, go to the Provisioning Portal on the iOS developer website and click on Provisioning.

    Compile Time

    After all that, you’re finally ready to compile your .ipa file to test on an iOS device.

    1. In the sidebar, right-click the PackageApp.bat file and select Execute.

      Execute!

    2. You’ll see a bunch of options. Since this is only a test, you can pick the fast test option. This option will quickly create an .ipa file for you to throw onto your iWhatever. Once you choose fast test, sit back and relax.

      Choices

    3. Look in the dist folder in the sidebar. You now have an .ipa file!

      Success!

    Test Your New App

    Take a moment and soak in what you’ve accomplished. You’re in the final steps of your epic journey of iEnlightenment. All you have to do now is load the hard-fought .ipa file up on your iWhatever.

    I made a copy of my Mobile Provisioning Profile and my .ipa file and put them in a separate folder. I suggest you do the same as a backup measure … better safe than sorry. Now let’s get that sucker onto your device.

    1. Plug in your iPhone/iPad/iPod Touch/iEtCetera and let it sync in iTunes.
    2. After it’s synced, go to Library -> Apps.

      iTunes

    3. To add your Mobile Provisioning Profile, click and drag it from your folder into the iTunes Library.
    4. Follow the same process to add your .ipa file.

      Note: You have to add your Mobile Provisioning Profile before you add your .ipa file! If you add these files in the wrong order, you may get errors!

      Drag and drop your files into iTunes

      After dragging your .ipa file into iTunes, you’ll see a generic App icon that FlashDevelop/AIR generated for you.

      Generic Apple App Icon

    5. In the left sidebar, click on Devices -> Your iPad/iPod/iPhone.
    6. Click on the little Apps button at the top of iTunes. You’ll see a screen that displays all your Apps. Within that screen, you should be able to find your App (you may have to scroll around a little to find it).
    7. Click the Apply button to transfer everything to your device.

      iTunes will go through the syncing process, and will add your App to your device. You can click sync a few more times just to make sure everything is good – iTunes doesn’t always behave perfectly on a PC.

      Note: If you get an error saying that the App failed to install, your Bundle ID or something within your Application.xml may be wrong. Double-check everything! There is no harm in deleting your App and from iTunes and transferring it again. You can also overwrite your Mobile Provision Profile with a corrected one.

      DOUBLE NOTE: If you change anything in your project, you must compile your .ipa file again, because it contains all the new information necessary for iTunes to run your App.

    8. Fire up your iPad/iPhone and BAM!

      AIR on iOS

      It’s so … beautiful. *sniff*

    To the App Store … and Beyond!

    In this section of the tutorial, you:

    • Pointed FlashDevelop to your merged AIR/Flex SDK folder
    • Corrected an error with the Mobile AIR template by deleting an extraneous icons folder
    • Copied your Mobile Provisioning Profile and your .p12 Signing Certificate into your project and pointed FlashDevelop to them
    • Pointed the SetupSDK.bat file to the merged SDK folder
    • Modified the application.xml descriptor file to match your project settings
    • Compiled your project and created an .ipa file
    • Copied your .ipa file and Mobile Provisioning Profile into iTunes
    • Synced your app and ran it on your testing device!

    With your project set up, you can continue developing your application until you have an amazing thing that you’re ready to foist on the app-buying public. There are still a few more things you need to know to deploy your app to the live iTunes store. What about that generic AIR icon? Wouldn’t you like to see something nicer in its place? And how do you get your .ipa file in front of the app-approvers at Apple to get it to show up in iTunes? And are we finished with certificates and profiles, or is there more to do?

    Short answer? There’s more to do.

  • Flash to iOS: A Step-by-Step Tutorial (Part 3)

    Flash to iOS: A Step-by-Step Tutorial

    This is the third part of our tutorial series by Intern Sina on creating an AIR application for free on a PC using FlashDevelop, and deploying it as a native app on an iOS device like the Apple iPad, iPhone or iPod Touch.

    Jump to other parts in the series:

    Luke Loses His Hand

    Part 2 of this tutorial was like The Empire Strikes Back. It was the crisis moment in the story of deploying a Flash project to the Apple iOS platform. It was dark, it was difficult, and Han Solo wound up frozen in carbonite. Part 3 is redemptive: with all that command line and certificate red tape out of the way, you can finally build our AS3 app using FlashDevelop. Watch closely, friends: you may spot some ewoks.

    It's a trap.

    It’s a trap.

    Install Flash Develop

    As I mentioned earlier in the series, FlashDevelop is a FREE, PC-only coding environment that is used throughout the industry and loved by many. If you haven’t installed it, head here to download the latest version.

    FlashDevelop 4

    FlashDevelop is an IDE (Integrated Development Environment) where you can create many different types of applications from scratch. The most amazing thing about FlashDevelop is that you don’t actually need to buy Adobe’s Flash Professional software to create Flash (swf) content. FlashDevelop has amazing, time-saving features like importing code libraries on the fly, and numerous awesome templates. At the time of this writing, the latest edition of FlashDevelop is 4.0.0. This version of FlashDevelop contains a template for Mobile AIR applications which you can use for iOS and Android development. In this tutorial, you’ll use the iOS version of the template.

    Create a Merged SDK Folder

    There are two SDKs (Software Development Kits) you’ll need to deploy Flash content to the iOS platform: Flex and AIR. Depending on the version of FlashDevelop you install, these two SDKs may already be included in the download. You’re going to download them both anew and put them in a single folder. That way, if you mess anything up, you can take off and nuke the site from orbit instead of messing up your main FD install. It’s the only way.

    1. Download the latest AIR SDK (which, at the time of this writing, was v3.0)
    2. Download the Flex SDK.
    3. These two packages download as .zip files. Extract them wherever you like on your computer – just make sure you know where you put them.
    4. Once you have both SDK’s extracted to separate folders, copy everything in the AIR SDK folder into the Flex SDK folder. Windows will ask you if you want to overwrite certain files. Say “yes” to everything.

      Merged SDK folder

      You now have a folder with the Flex SDK and the AIR SDK merged into one. This is a Good Thing™.

    Point FlashDevelop to the Flex SDK

    In order to compile (build and execute) your app, you have to point FlashDevelop to the merged SDK folder that you just created.

    1. Open up FlashDevelop and hit F10 or go to Tools->Program Settings in the menus.

      Program Settings

    2. In the Program Settings menu, click on AS3 Context.
    3. Find the Language section, and the Flex SDK Location line within it.

      AS3 Context

    4. Click the ellipsis button at the end of that line, and navigate to the merged SDK folder.
    5. Click Close to commit the change.

    Set Up Your Mobile AIR Application

    Once you have downloaded and installed FlashDevelop, open it up and you should see it in all its glory:

    FlashDevelop 4 Interace

    To begin with, you’ll need to create a new FlashDevelop project, which is a group of folders governed by a file filled with metadata about your project.

    1. Create a new project by clicking Project -> New Project in the menu.
    2. Now you will see a screen with a multitude of options. These are all project starter templates that FlashDevelop has for you to use. The one you want is the AIR Mobile AS3 App. Select this template, choose a location on your hard drive to save it, give a name to your project, and hit OK.

      Note: A package name is not required but the option is there if you’d like to use it.

      FlashDevelop 4 Project Templates

      After you hit OK, FlashDevelop creates a number of folders and files for you, including:

      • The .as3proj file, which is a FlashDevelop project file filled with metadata that keeps track of various aspects of your project.
      • The bin folder. This is where your finished files end up.
      • The lib folder, where you can put your “construction” files and artwork.
      • The src folder, which contains your .as AS3 code files.
    3. Once you’ve created your project file, FlashDevelop starts you off with a blank screen. To open up your code, click on the src folder in the Project sidebar on the right. (The Project sidebar lists your computer’s actual directory structure so that you can access your Actionscript files quickly and easily.)
    4. Inside the src folder, double click the Main.as file to open it. This is your project’s point of entry, where you can start writing the code for your app.

      FlashDevelop 4 Main.as

    5. Push the F5 key on your keyboard, or the click the little play button at the top-middle of FlashDevelop to compile and run your project.

      FlashDevelop 4 Compile Button

      The first compile will take little bit of time, but any compile after that should be quick, because the compiler builds on an as-needed basis, compiling only your most recent changes (as opposed to Flash Professional, which compiles your ENTIRE project every single time. Bleh!). Once you run your new project, the FlashPlayer should pop up and you should see a blank screen. Luckily, this is exactly what we want. As of right now, this is your App.

      FlashDevelop 4 Blank App

    Hello, Planet

    This is nice and all, but let’s try to the write a simple message on screen so that when we are testing, we know it actually works. Let’s write “Hello Planet” on-screen.

    1. Just below the green commented line where it says //entry point in your Main.as file, copy and paste these lines into your code:
      var tf:TextField = new TextField();  
      var format:TextFormat = new TextFormat();  
      format.font = "_sans";  
      format.size = 48;  
      tf.defaultTextFormat = format;  
      tf.text = "Hello Planet";  
      tf.width = stage.stageWidth - 20;  
      tf.x = 10;  
      tf.y = 10;  
      addChild(tf);
      

      Code Entry Point

    2. Click the compile button (or press F5). Did it screw up? Good. There are a couple more things you have to do before you are ready to compile without errors.
    3. In your code, click to place your cursor carat on the word Textfield and hit Ctrl+Shift+1 on your keyboard. The word turns blue. If you scroll to the top of the class, you’ll notice that there is an extra import line at the top of your code. CTRL+SHIFT+1 is a special feature of FlashDevelop that does code completion. In this instance, CTRL+SHIFT+1 automatically handles your import statements for you. You need to import the TextField code with this statement if you want your TextField to work.
    4. Use CTRL+SHIFT+1 on the TextFormat word and you should see this:

      Import Statements

    5. Now click Compile (or press F5).

      Hello Planet

      Thar she blows!

      (It works, but it’s no Angry Birds. – Ed.)

    Bust Out the Hardware

    This is moving along nicely. You:

    • Installed FlashDevelop, a free and open-source IDE for creating Flash and AIR content
    • Downloaded and sunk the latest AIR SDK and Flex SDK into a single, merged folder
    • Pointed FlashDevelop to the Flex SDK to use its superior compiler
    • Created a new FlashDevelop project using the Mobile AIR application template
    • Wrote and compiled a new Hello Planet AIR app that you can deploy to a testing device

    In the next part of the tutorial, you’ll fine-tune FlashDevelop and modify a number of settings and batch files to create the magical, mystical .ipa file, and you’ll see that file running on your testing device.

    Continue to Part 4