打印

[编程] 这个错误是怎么回事啊 小弟不懂 请朋友们帮个忙 谢谢

输出
**错误** 场景=场景 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);
}
}
小弟在线等
楼主的transition应该写成transitions你少写了个s
-_!! -_!! -_!!

TOP

还在为头像烦恼?还在为不能关注好友动态烦忧?快来蓝色理想家园吧!