你这个没有办法通过for来添加缓动,建议你可以精简下,如下
//向上滑动效果
_pro.shang = function (){
var self = this;
num++;
if(num==1){
Haha(this.loadnew1,-1030,300,0,100,0);
Haha(this.loadnew2,0,300,1,500);
Haha(this.loadnew3,1030,300,0,500);
}
if(num==2){
Haha(this.loadnew1,-2060,300,0,100);
Haha(this.loadnew2,-1030,300,0,500);
Haha(this.loadnew3,0,300,1,500);
}
}
//向下滑动切换效果
_pro.xia = function (){
var self = this;
num--;
if(num==1){
Haha(this.loadnew1,-1030,300,0,500);
Haha(this.loadnew2,0,300,1,500);
Haha(this.loadnew3,1030,300,0,500);
}
if(num==0){
Haha(this.loadnew1,0,300,1,100);
Haha(this.loadnew2,1030,300,0,500);
Haha(this.loadnew3,2060,300,0,500);
}
}
function Haha(obj,yy,times1,alphas,times2)
{
Tween.to(obj,{y:yy},times1,null,Handler.create(this,function() {
Tween.to(obj.loadtext,{alpha:alphas},times2,null,null,0);
}));
}