2008年1月23日 星期三

Use Script to control Tweening Motion

Not only click button do tweening motion. You may try to use "ActionScript to do" . It is more flexiable to control "movieClip" SPEED. Hope to enjoy my video.



enter_btn.onRelease = function(){ easex(ball_mc, 400, 90); };

function easex(mc, targetX, targetY){ mc.onEnterFrame = function(){ var distanceX:Number = targetX - this._x; var distanceY:Number = targetY - this._y; this._x = this._x + distanceX / 5; this._y = this._y + distanceY / 5; };

0 Comments: