Milk Carton Boy for Android

Two months ago, I released Milk Carton Boy Shake Well for Flash mobile. I developed it using FlashDevelop, Away3D, and Flex SDK 4.1 and didn’t use any mobile specific APIs (gesture, touch, or accelerometer). Basically I just adjust the screen size for 400×678 and the game works really well on Android Browser with Flash Player.

Now I have my Samsung Galaxy S, it’s much easier to test the game. It is quite easy to convert an existed FlashDevelop’s Flash project to Android AIR project. So I immediately convert the game to Adobe AIR app and tested on my Android.

Milk Carton Boy installed on Android

Milk Carton Boy installed on Android

Here are some interesting things that I found during the testing:

Milk Carton Boy for Adobe AIR performs (a little bit) slower compare to Flash Player! This is quite surprising since I expect that it could run faster, well at least runs at the same speed 😐 I’m using Adobe AIR 2.5.1.1774 and my Flash Player version is 10.1.92.8

I really need to implement a button to quit the game. I never see any Flash game with a quit button. That’s because we don’t need it 😀

When the user closes the browser or browses to other page, our Flash game will be gone automatically. However, Adobe AIR app, just like other Android app, will be moved to memory if the user press HOME button or BACK button. It will stay in the memory until the OS kills it (when it needs more memory). That’s why if you don’t explicitly quit your app, it will stay (or even keeps on playing) on background.

As a bonus, here’s what I did to convert my FlashDevelop project for Flash to FlashDevelop for Android 😉

  • Copy your FlashDevelop project to another file name, like myGameAndroid. You can have two project files on the same project folder
  • Now open you project file on any text editor (Don’t double click it). Modify the following properties:
    • Pre-Build command
      <preBuildCommand>taskkill /f /fi "IMAGENAME eq adl.exe"</preBuildCommand></pre>
    • Build Option. Inside the <build>, change the <option additional=”” /> to <option additional=”+configname=air” />
    • Other project options
      <!-- Other project options -->
      <options>
         <option showHiddenPaths="False" />
         <option testMovie="Custom" />
         <option testMovieCommand="$(FlexSDK)binadl.exe;application.xml bin" />
      </options>
  • Make sure that you have installed Adobe AIR SDK 2.5 on top of your Flex SDK, creates the application.xml, and the certificate file. See my previous post about creating Adobe AIR app for Android
  • Delete any files on obj folder before opening the project file

Enjoy!

How to Create Adobe AIR for Android using FlashDevelop

If you’re a Flash developer who wants to start developing Flash with Android device, then this post might help you to get started 😉

Adobe AIR SDK 2.5 has been released since last October which includes Adobe AIR for Android packager. Most help avaialble are for Flash Builder 4 or Flash CS5, only a few using FlashDevelop.

This post is a step-by-step instruction for creating Actionscript 3 Flash project for Android, based on Adobe’s guide for creating Adobe AIR application for Android with Flex SDK.?This will not compatible for For Flex Mobile (Flex Hero/4.5 SDK). Stay tune since I’ll write one later 😉
Update (21st Dec):For using Flex Hero on FlashDevelop, see my latest post 🙂