Just thought I’d share a video of an iPhone app that I considered developing using Flash Professional CS5’s iPhone Packager. Of course I won’t be able to publish it to the App Store due to changes in Apple’s developer agreement but I still thought it would be interested to throw together a very rough prototype and see how it performed.

Well as you can see, even on my trusty old 1st gen iPod touch, I managed to achieve a more than acceptable frame rate using Flash. You can swipe horizontally to swap between a set of vehicles, or scroll vertically to change the skin of the current vehicle.

Okay, it’s hardly rocket science but there have been a lot of rumours going around of late that it’s almost impossible to get a decent frame rate on iPhone using Flash. That’s simply not true, but you do have to remember that you’re developing for a mobile device, which nearly always requires you to make special design and coding considerations.

  1. Interestingly, to do that with objective c, the code would be along the lines of:

    [[view animator] setFrame:position];

    From inside the loaded image “movieclip”. I think that’s the part of the rumour you may be missing – it can be harder to do basic platform things in Flash. That, of course, is one of Apple’s main points – using Flash hurts both the developer (can’t access the latest cool feature to differentiate the offering) and the consumer (I have all these great features available, but no application lets me use them).

    It also requires you to think about how to construct the graphics for the application – and you are constructing them in a way that may reduce flexibility for other platforms, potentially reducing the portability of the “platform independent” Flash application.

    Just adding some balance to your blog here 😉

    Don’t mind me, I’m off to try and work out how to do anything in HTML. Anyone written a tweening library for that yet? 🙂

  2. hi great post/video! could please please post sample code for this would love to see exactly how you optimised this (I am having loads of issues getting smooth tween on the packager)…

  3. Hello,

    Exactly what I am looking for! Very curious how you got such smooth tweening. I havent seen it this smooth even on the iPhone4.

    Can you post the source up for this ?

    Jonathon PItman
  4. Hi Kurt and Jonathon. I’ll try and get a post/tutorial put together for you detailing how I did this. In the mean time you might get some help from this ‘Packager for iPhone: Render Performance’ tutorial I wrote a few months back: http://www.yeahbutisitflash.com/?p=986

    Christopher (Author)
  5. Great post! How well does this type of scrolling perform on an iPad?

  6. I’d love to see the source for this if you choose to release it. How are you tracking the required scroll offset? Are you using TransformGestureEvent.GESTURE_SWIPE? I can’t figure out how to get an offset value relative to your swipe movement? That event only returns 1/-1 to gain direction?
    Cheers 🙂

  7. Stunning smooth movements! How do you get it ? I am trying to achieve the same results with a simple app with inertial scroll I am building..but it seems I do something wrong, because even caching all the bitmaps on the stage (I have to scroll a movieclip with a vertical list of buttons inside, both cached as bitmap) I get really unsmooth scroll.
    Let me know if you want to share your knowledge with us!
    Happy new year!

  8. I’ve noticed my scrolling becomes weird ONLY when the y property of my MovieClip goes on negative coordinates. Any tip ?

  9. Same issue here. Even with everything cachedAsBitmap, my 320×600 composite of a dozen labels and one image, all loaded programatically, startDrag()s much slower than this. Did you do just a single image?