[원문] : http://board.flashkit.com/board/showthread.php?760109-using-TWEEN-to-scale
import fl.transitions.Tween;
import fl.transitions.easing.*;
var toMouseX:Tween;
var toMouseY:Tween;
var initialState:int = 1;
var finalState:int = 2;
stage.addEventListener(MouseEvent.MOUSE_DOWN, onStagePress);
function onStagePress(event:MouseEvent):void
{
easingAnimation();
}
function easingAnimation():void
{
this.toMouseX = new Tween(box, "scaleX", None.easeNone,
this.initialState, this.finalState, .5, true);
this.toMouseY = new Tween(box, "scaleY", None.easeNone,
this.initialState, this.finalState, .5, true);
this.initialState = this.finalState;
this.finalState++;
}
- Posted
- Filed under Action Script