More Flex tweening

Submitted by Falken on
One thing I had to work out this week was how to tween something more complex than just a property, and the solution I went with goes like this:
var t:Tween=new Tween(this,from,to,duration);//Create a new Tween:

This will then call two functions in 'this' - onTweenUpdate and onTweenEnd.
Both functions are given as their argument the next value in the tween (so onTweenEnd gets the final value (i.e. 'to').

This enables you to get a nice progression of just about anything.
Sections