worked
asked on
Using fl.transitions.tween while updating begin and finish locations?
Hey there- How do I use the tween class and at the same time update the "begin" and "finish" properties so that motion continues each time a button is pressed. For example if I replaced the "begin" and "finish" properties with the following:
var containerObj:Sprite = new Sprite();
containerObj.x = 0;
containerObj.y = 0
var btn:Sprite = new Sprite();
btn.x = 0;
btn.y = 10;
btn.addEventListener(MouseEvent.CLICK, clickBtn);
var begin:Number = containerObj.x;
var finish:Number;
private function clickBtn(evt:MouseEvent):void {
var myTween:Tween = new Tween(containerObj,"x",Strong.easeOut,begin,finish,1,true);
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER