How To Make An Android App using Actionscript 3 for Free in Four Main Steps on a Windows Computer. This is Version 1.02.076 of http://www.rocksetta.com/flashairapp/

How to make flash games for desktop computers or air apps for android cell phones using Actionscript 3 the free Adobe Flash Programming Language.

This same actionscipt file can also be used to make iPad and iPhone apps but that needs a $99.00 developer license from Apple to get a certificate file and Provisionning file. See FlashDevelop for more information. The bottom of this page shows the two extra steps.

Note: It is very important that you install FlashDevelop for these batch files to work.

Enter the name of your program and make a new directory on your windows computer with that name. This is where all your files will be stored. Then -->
Unique word or number for each button pressed--> Then click some premade functions below:



Step 1A. Make the Actionscript 3 .as file

Save the following text as an .as file with the exact same name as the main file name above. For example: myFileName You can use the Save As button below but it is safer to select all the text, copy the text, and paste the text into an open notepad document. When saving make sure it has the .as ending and not a .txt ending (The quick way to do this is to save the file with double quotes around it.)


Step 1B. Compile your flash game for desktop web pages

To Compile the .as file above into a .swf adobe flash file copy the following text into a file called anything with a .bat ending such as "asFileToSwf.bat" and then drag the above .as file onto it.
Note: if you install flashDevelop all the sdk's will be installed in the correct locations for these batch files to work. Otherwise you have to find out where the flexsdk is. All this batch file does is sends the .as file to the mxmlc.exe compiler. If it compiles you have a working flash game. It then loads internet explorer to see what it looks like. This is a good way to test your actionscript program.
Save the file below with the extension .bat, such as:.bat

Step 1C. Make a web page to test your Flash game on your desktop computer

Save the following text as a web page such as myPage.html. Then double click this to see your web page
Save the file below with the extension .bat, such as:.html


Step 2. Compile your flash game for android.

To Compile the .as file above into an android app YOu have several steps to complete. The first is to make an air swf. file. Copy the following text into a file called anything with a .bat ending such as "asFileToAirSwf.bat" and then drag the above .as file onto it.
Note: if you install flashDevelop all the sdk's will be installed in the correct locations for these batch files to work. Otherwise you have to find out where the flexsdk is. All this batch file does is sends the .as file to the amxmlc.exe compiler. If it compiles you a few more steps to complete
Save the file below with the extension .bat, such as:.bat

Step 3. Make a certificate for all your android apps.

Make your own certificate by double clicking the following text saved as a batch file with a .bat ending such as "DoubleClickToMakeCert.bat". This step you need to do only once as that is your certificate for all your android apps. Do not forget your password. Note that the file will be saved up one directory so that the certificate is not saved inside the app package.
Save the file below with the extension .bat, such as:.bat Using the password

Step 4A. Make an xml file to describe your app.

Save the file below with the extension .xml and the same file name as your main file name above, such as:.xml

Step 4B. Package your flash App for android.

Now you have to package all the important files with your .swf flash file and the cert file you made above. If it works you should end up with a .apk file that can be uploaded to the google play store.
Call this file.bat


Step 4C. Put your Android App on a website to test it.


Call this file.html


Hopefully everything worked.

Here is an example HelloWorld.apk app which you can try testing on your android device before trying the steps today to see if you can install the apps on your android cell phone. (Android phone must be set to: Menu-->Settings-->Security-->unknown Sources (Allow installation of non-Market apps).downloads)
Installing known googpe play store apps is a bit of a pain because they do not automatically install. You have to find them in the downloads area and then click on the .apk file.




If things do not work.

Here are a few good starting places.
Anyone working directly from the Adobe Air sdk and not FlashDevelop will have the mxmlc.exe, amxmcl.bat and adt.bat files in different locations. These locations will have to be changed using the steps below. This only effects files "a1 ,a2, a3, a4". Another location for problems is that your system needs java installed (good luck finding and installing the correct version to run Adobe Air) so that the adt.bat file can find it. I don't understand the commands in the adt.bat file (One confusing line saying
@java -jar "%~dp0\..\lib\adt.jar" %*
) but I assume they just help find your latest version of java. I am sure you could replace the whole adt.bat file with a direct link to the correct location of the java system file but not yet sure how to do that. Once again everything is much easier if you just install FlashDevelop . FlashDevelop should ask for you to update your version of java ( java 1.6 which is java 6). And it should also install the latest version of Adobe Air skd. Also FlashDevelop helps do the same things as this website but I like to see exactly what I am doing and prefer to make all 8 individual files.

Also remember that you have to execute "a1 ,a2, a3, a4" by double clicking on them. Unfortunately if there is an error the DOS window disappears immediately. It is better to go into DOS and call the batch file from the command line, that way the screen will not disappear and you can read the error. An easy DOS prompt can be made with a batch file that just says
command
I call this file run.bat You still have to find your folders using the cd (for change directory) command and don't forget the great trick of the tab key which auto fills the file or folder names after a few unique letters. Also the dir command is useful to view whatever directory you are presently in. So if you have errors try the following steps. (this will change steps a1 ,a2, a3, a4 as soon as you have clicked away from the blank textfield.)

(Issue Step 1B) If you have installed FlashDevelop the mxmlc.exe file should be located at C:\Program Files\FlashDevelop\Tools\flexsdk\bin\mxmlc.exe if that file is elsewhere on your system locate it here then copy it here-->

(Issue step 2B) Also the amxmlc.bat file should be located at C:\Program Files\FlashDevelop\Tools\flexsdk\bin\amxmlc.bat if that file is elsewhere on your system locate it here then copy it here-->

(Issue Step 3, 4B) Also the adt.bat file should be located at C:\Program Files\FlashDevelop\Tools\flexsdk\bin\adt.bat if that file is elsewhere on your system locate it here then copy it here-->

You can do these change either on this webpage or after the files have been saved. You only have to change files a1 ,a2, a3, a4 Note: doing the work on this webpage has a few security things that are not good webpage practice such as the buttons to save batch files, or the file search text fields that you then copy to empty text fields. From a webpage safety point of view it is much better to copy the information in the textfields and make your own .as .bat .xml .html files and then make changes by hand before running them. I only did it this way so that it works fast and well for myself.Good luck.



So even the above did not get the batch files working and you have java jre and airor flex sdk installed in different locations than flashdevelop would install them. Here is one more thing you could try

(Issue Step 3, 4B) Lat thing to try: adt.bat file just loads adt.jar and java to extract the jar file. So we could find both these files. To look something like: "C:\Program Files\Java\jre6\bin\java.exe" if the java file is elsewhere on your system locate it here then copy it here--> and then the adt.jar file "C:\Program Files\FlashDevelop\Tools\flexsdk\lib\adt.jar" then copy it here-->






The following information has not yet been tested and probably has several mistakes
Use only as a general guideline

What about the iphone, ipad iOS Mac situation?

Lets add a few steps for changing the adobe air files into a Mac ipa installation package. This has fewer steps since we have to get the Certificate from Apple Developer and also get the provisioning certificate which indicates which devices it can be tested on. Note: You can get an apple developer login for free but to get the certificate takes $99.00 . Testing and putting on the iTunes app store are two different things. Hopefully I make that clear.

Mac Step 1A. Make an xml file to describe your Mac app.

Save the file below with the extension .xml and the same file name as your main file name above, such as:.xml

Mac Step 1B. Package your flash App for Mac iOS Testing on a jailbroken Apple Device.

It seems a bit steep to have to pay about $100.00 to make a Hello World iOS App. So if you have access to a jailbroken iOS device here is a free solution.
I have problems with this step since you are not really sure what is in the cert file and provisioning file. Here is the link to download those files. http://gadgetzz.com/2011/08/12/how-to-make-an-iphone-app-without-coding-or-dev-certificate/ You are looking for links that say "This file (your developer certificate)" and "This file (your app verification file)" Check the extension when saving the file as it may change to .xml instead of .mobileprovision
You are still going to have to get the final .ipa file from your computer to the jailbroken Iphone, iPad, iTouch but that should not be too hard.
Call this file.bat


Mac Step 1C. Package your flash App for Mac iOS Testing.

Once you have paid for your Apple Developer License you can try testing your app on a regular device. You will need the cert file you got from Apple, and the Provisioning file for the devices you are going to test your App on. you will have to insert the path to those files in the information below. If it works you should end up with a .ipa file that can install on your iTunes and test with a connected iPad, iPhone etc.
Call this file.bat


Mac Step 2. Package your flash App for Mac iOS iTunes App Store.

Now you have to package all the important files with your .swf flash file and the New cert and provisioning file(s) you got from Apple,Note: These are different than the testing cert and provisioning used above. You will have to insert the path to those files in the information below. If it works you should end up with a .ipa file that can upload to the Apple Store using a Mac Computer.
Call this file.bat