Thanks for the tips Kevin - I am trying anything and everything to improve performance. I only have 8 balls moving with collision detection and reactions using vector maths and what works so smoothly on the PC is really sluggish on the iPhone. I have written the same code in Corona and it works well on the iPhone. However I am determined to get it working with the Flash version.
-----Original Message----- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kevin Newman Sent: 12 October 2010 17:07 To: Flash Coders List Subject: Re: [Flashcoders] Flash CS5 iPhone development question I've had a similar experience. What I've done is to divide my game (Event.ENTER_FRAME) and my render logic - stage element access (Event.RENDER) loops, and on 3G update only every other frame. You can do that by filtering on Capabilities.os, and then based on which model you detect, set a toggle to run at the end of ENTER_FRAME handler, that will invalidate the screen (I think it's root.invalidate()) either every frame for high end devices, or every other frame for iPhone 3G, iPod 2nd gen, and lower. // set useFrameSkip in init based on Capabilities.os if (useFrameSkip && !skipFrame) { skipFrame = true; root.invalidate(); } else { skipFrame = false; } Also, make sure you are setting those cacheAsBitmap and cacheAsBitmapMatrix flags when appropriate, or else you aren't properly utilizing the GPU. Seems to help. :-) Kevin N. http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/sys tem/Capabilities.html?filter_flex=4.1&filter_flashplayer=10.1&filter_air=2#o s On 10/12/10 6:29 AM, Paul Steven wrote: > Be sure to check your creations on an iPhone 3G as my tests so far have not > been great in terms of performance on these devices and that is with highly > optimised code. _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders