tilt-shift photography of HTML codes

ActionScript based animations in FlashLite apps?

Well, I’ve been thinking to write something about this but didn’t managed time to put it on paper. also, i was keeping eye on newly released FlashLite games ‘n apps. Especially those which offer rich UE (user experience).

We’ve been doing some commercial FlashLite projects for our clients recently. and created some nice rich UEs.

Creating nice UE in FL apps is quite effort taking job. Developer & designer have to consider many mobile and FL constraints especially mobile processor’s power for animations and effects they going to implement in the app.

In our recent FL developments and my personal analysis of other FL apps, I found tween (Flash’s timeline) based animations & effects performing better than ActionScript based animations & effects (comparing performance and smoothness of animations).

I know you got a question. Why?

Simple. In ActionScript based animations, on each frame we calculate the next x,y positions (or alpha/rotation depending on the animation/effect we want) then FL redraws the screen. FL has to do double operations on every single frame until the animation is finished (this also depends if you have put a condition to stop or not). This results as sluggish animations, the end user experience is not smooth and satisfactory.

In timeline based animations, they are already pre-configured using the Flash’s timeline. So, FL has to do only its own redrawing operation on each frame. Because mobile processors don’t have much processing power, this little performance difference can be noticed easily.

Animating complex vector graphics can cause similar behavior. To avoid this, developer can use raster graphics for animated objects.

Also remember, more CPU consumption means draining battery quickly.

In my next posts, I’ll be showing you some ActionScript based anims and Flash’s timeline based animations with dynamic contents.

I’d also like to know about your experiences.

// chall3ng3r //

1 Comment

  1. […] Faisal from Orison technologies points out this interesting subject on FlashLite development. He claims, using ActionScript for animations rather than tweening, results in worse performance and fluency in most cases. He supports his idea by pointing out the increase in number of operations per move (calculation + redraw instead of a single redraw) compared to tweening. […]

Leave a Reply