Using HaXe and NME to target Android and iOS
You created your first Hello World app, but you're left wanting more. You've heard all these buzz words about HaXe being cross platform and you want to get your app onto Android or iOS today. This is where NME comes into play, which provides an easy mechanism to build an app and test it on a mobile device or simulator.
Hopefully you already installed NME and you are ready for the next step.
It's Time to Play
Let's grab a flashy example to excite our inner child. This project uses the Actuate animation library to animate colored circles. So make sure you have Actuate installed by running the following command:
Great, we have every dependency installed and we are now ready to start building. To build with Android, you must have a physical device connected. However, if you are building for iOS you just need to have Xcode installed, which is free.
HaXe on Android
To build for Android, make sure you have your device plugged in and navigate, via terminal, to the directory where you downloaded and extracted the example project. Next we type in the following command, which may take a while depending on your machine specs:
Woot! We now have a bunch of circles running around like a bunch of crazies. Pretty easy so far.
HaXe on iOS
To build for iOS simulator navigate, via terminal, to the directory where you downloaded and extracted the example project. Next we type in the following command:
Again, that was pretty painless for getting it onto multiple devices in a short time.
But Wait, There's More
So you have the example project on Android and iOS, but you want to target more platforms such as windows mobile, a web page, or webOS? All you have to do is change the target device name and it should export the project accordingly.