[]基本效果已经实现,想用for批量绑定事件

    之前的问题描述有点不清楚,不好意思,将图片里的位置用for批量绑定一下,demo已上传,求大神指点
for上.png


for下.png


 
已邀请:

cuixueying

赞同来自: cai95854006

你这个没有办法通过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);
}));
}

要回复问题请先

商务合作
商务合作