I have a class with a method “movePaneTo”. I want to create a tween and do multiple things at every step not just change a movieclip property. Tweening a property of the class seems to be working but how do I
[LIST=1]
[]refer to the class that initiated the tween from the onMotionChanged handler, so that the trace would display the current value?
[]Should I be using a listener for the onMotionChanged?
[*]What’s this kind of function (the one assigned to “onMotionChanged”) callled?[/LIST]
public function movePaneTo(y) {
var tweenY:Tween = new Tween(this, "worldY", Regular.easeOut, worldY, (worldY+y), 10);
tweenY.onMotionChanged = function():Void {
trace(worldY);
}
}
Thanks for your help.