当前位置: 首页 > 工具软件 > Tween > 使用案例 >

Tween类 的缓动效果

蓟捷
2023-12-01

Tips:导入类,右键对象连接设置

//导入Tween类

import mx.transitions.Tween;

//导入easing类

import mx.transitions.easing.*;


this.attachMovie("mc", "mc", this.getNextHighestDepth(), {_x:20, _y:100});
//var myBox:Tween = new Tween(mc_A, "_x", Elastic.easeOut, 0, 300, 3, true);
var myBall:Tween = new Tween(_root.mc, "_x", Elastic.easeOut, 0, 300, 5, true);
  myBall.onMotionFinished=function(){
  trace("缓动结束了!");
   }

 类似资料: