stayhere 发表于 2016-10-11 17:21:15

LTweenLite内的onComplete事件会多次执行

        var gameLayer = new LSprite();
        addChild(gameLayer);
        LTweenLite.to(gameLayer,1,{alpha:0.9,onComplete:function(){
                alert(1);// 这里会根据 .to() 的次数执行多次;
        }})
        .to(gameLayer,1,{alpha:0.8})




lufy 发表于 2016-10-12 10:14:27

多谢了,下个版本我调整一下
目前的话,你可以用下面的方法来解决LTweenLite.to(gameLayer,1,{alpha:0.9,onComplete:function(){
                alert(1);// 这里会根据 .to() 的次数执行多次;
        }})
        .to(gameLayer,1,{alpha:0.8,onComplete:function(){}})

发表于 1970-1-1 08:00:00

发表于 1970-1-1 08:00:00

页: [1]
查看完整版本: LTweenLite内的onComplete事件会多次执行