输出
**错误** 场景=场景 1, 图层=图层 1, 帧=1:第 21 行: 无法加载类或接口'mx.transition.Tween'
var twMove:Tween = new Tween(this,"_y",oclips[this._name],50,350,2,true);
ActionScript 错误总数:1 报错:1
小弟是在书上看到的然后想做出来老出错o(∩_∩)o...
import mx.transition.Tween;
import mx.transition.easing;
var aClasses:Array = [Back,Bounce,Elastic,Regular,Strong];
var aEasingMethods: Array = new Array();
for (var i:Number = 0; i<aclasses.length;i++){
aEasingMethods.push(aclasses[i].easeIn);
aEasingMethods.push(aclasses[i].easeOut);
aEasingMethods.push(aclasses[i].easeInOut);
}
var mclip:MovieClip;
var nDepth:Number;
var nX:Number = 20;
var oclips:Object = new Object();
for(var i:Number = 0; i<aEasingMethods.length;i++){
nDepth = this.getNextHighestDepth();
mclip= this.attachMovie("circle","mclip"+nDepth,nDepth,{_x:nX,_y:50})
nX+=mclip._Width+5;
oclips[mclip._name]= aEasingMethods[i]
mclip.onPress = function():Void{
var twMove:Tween = new Tween(this,"_y",oclips[this._name],50,350,2,true);
}
}