Old School Flex Animations

I was just experimenting with some animation techniques when I tried one of the old school flash 5 stuff in Flex. In general I`m not a fan of the build in effects in Flex and most of the time I just do the animations myself with Tweener . I just think it`s smoother and more flexible. One thing that I find difficult to achieve is animating targets that change often and abrupt. For these types of thing the build in effects and even Tweener does not work very well. I got the idea when I saw Chet Haase example here. It`s a nice app but I don`t like that it only changes the interface when you release the slider. Would be much cooler and intuitive if live dragging was possible. So I did a dirty little example that does not use the fancy effects or Tweener but good old onEnterFrame exponational function (think that`s how Andries Odendaal coined it back then!?) tweening. It`s not a nice approach with some drawback but I think it just gives the sweetest result.

Take a look at the video and if you like download the AIR app (View source enabled)

[flashvideo filename=http://www.richapps.de/wp-content/uploads/2008/07/screenflow.flv /]

So this is maybe not how you would do it in a real world app because the ever running loop is not so nice but the smoothness of the animation is just unbeatable – or? How would you do this in a clean way?

Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+Pin on Pinterest

6 thoughts on “Old School Flex Animations

  1. nice effect, it is so hard to remember there is still onEnterFrame in flex 😉 I wouldn’t mind that loop as it is happening no matter if you use it. have you tried resize event for window?

  2. A good way to do it would involve overriding the updateDisplayList method of the component, doing the animation there. That’s the part of the component lifecycle which handles layout of children and it will be called anytime the component resizes or its children resize, etc.

  3. cool effect, perfect for image gallerys 😉 why dont you just stop the enterFrame loop once the tiles are sorted and just start it on any other event you wish?!

Leave a Reply

Your email address will not be published. Required fields are marked *