I have a mc that needs to be scaled. But rather than do that in position, it should go toward the center of the stage. Problem with below code is that, the object “leaves” stage left before tweening toward the center, rather than from it’s current position. I’m not sure what to place in the “x” tween parameter for beginning position to prevent this. Or should I be using a transition manager here?
Code:
var scaleTo = 2; // scale size for tween
var secs = 1; //time for tween
var finalx:Number = stage.stageWidth / 2;
function dothetween(event:KeyboardEvent):void
{
var tweenHY:Tween = new Tween(h1_mc,“scaleX”, Strong.easeOut,1,scaleTo,secs,true);
var tweenHY:Tween = new Tween(h1_mc,“scaleY”, Strong.easeOut,1,scaleTo,secs,true);
var tweenHmove:Tween = new Tween(h1_mc, “x”, Regular.easeOut, 1, finalx,1,true);
}