Here are some good Links to Optimize your API:
Flash to Mobile: Sprite Animation Techniques
Single Bitmap Display Object with Blitting – 8BitRocket offers some excellent tutorials on how to achieve pixel blitting within Flash. I followed these tutorials and found that their technique results in phenomenal performance within the web browser when working with simple and numerously repeated bitmap sprites. However, even with their optimized game timer loop, their technique struggles with high-resolution mobile devices like the iPad. As a simple test, I compiled their optimized game timer loop for Asteroids as an iPad app after changing the canvas size to 1024×768. The iPad’s processor struggled to redraw the game-state (running anywhere from 5-13 fps) and resulting in a very choppy asteroid game.
8Bit’s example/code: http://www.8bitrocket.com/2008/4/8/Tutorial-Creating-an-Optimized-AS3-Game-Timer-Loop/
Multiple Display Objects that Contain Bitmaps Instead of Vectors– Since I was getting the worst performance on iPad for all of my tests, I did a search for iPhone/iPad games created with Flash. There aren’t a lot out there; in fact, I found only one that included source code: Mike Chambers “Pew Pew” game, which can be found at: http://www.mikechambers.com/blog/2010/07/14/source-code-for-pewpew-released/
For optimal sprite animation performance on mobile devices, you need two things:
1) Implement the GPU vs CPU renderer for the mobile device within the publish settings. This results in the fastest bitmap manipulation, and, on the Android, also achieves a smooth, vector-like appearance on bitmaps that have been rotated.
2) Store Sprite Animations in RAM memory as BitmapData. There are two ways in Flash to manipulate bitmap data – the draw method and the copyPixels method. The draw method can convert vector data to bitmap data, but is much slower than copyPixels method (it actually runs faster in CPU render mode). The copyPixels method is the fastest and highest performing way to manipulate sprite animations, but it only works on images stored as BitmapData.
Team Color: Any turn-based or RTS game developer will undoubtedly recognize the problem of assigning unique team colors to each player’s unit. In my PC/web-based Flash version of Hero Mages, team colors are movie clip objects within the vector animations that I simply tint the color of to match the player’s color. However, bitmap data obviously does not contain any separate structures that can be manipulated this way- so how can you assign unique team colors to the optimized sprite renders? Check out Mario Klingemann’s Selective Color Replace component at http://www.quasimondo.com/archives/000614.php
Adobe’s Developer Connection for Mobile Development:
http://www.adobe.com/devnet/devices/fpmobile.html
Android AIR Optimization Techniques:
http://www.unitedmindset.com/jonbcampos/2010/09/08/optimization-techniques-for-air-for-android-apps/
http://blog.newmovieclip.com/2010/11/13/adobe-air-mobile-application-performance-optimization-on-android/
Found that in this Forum:
http://www.kirupa.com/forum/showthread.php?p=2594452#post2594452