我已經創造了一些充斥着,但我必須阻止他們需要停止刪除補間動畫
正如我需要重用一些資產與新的補間。 覆蓋:真正幫助一些,但是,
這是函數,一旦被掀起,用定時器,他們發揮不管,你可以看到有很多電話的腰板
window.autoSurfaces = function(){
if(!window.gameStarted){
console.log("autoSurfaces");
playAutoScene();//start playing function to control numbers and alpha of wheels
var delay = 700
var animtime = 500
currentTween = createjs.Tween.get(leaves_anim).to({alpha:.7}, animtime).wait(800).call(leavesOut);//call end frame function
tweenAray.push(currentTween)
console.log(currentTween)
leaves_anim.gotoAndPlay("go");
function leavesOut(){
currentTween = createjs.Tween.get(leaves_anim).to({alpha:0}, animtime).wait(200).call(snowIn);
tweenAray.push(currentTween)
console.log(currentTween)
}
function snowIn(){
currentTween = createjs.Tween.get(snow_anim).to({alpha:1}, animtime).wait(800).call(snowOut)
tweenAray.push(currentTween)
console.log(currentTween)
snow_anim.gotoAndPlay("go");
}
function snowOut(){
currentTween = createjs.Tween.get(snow_anim).to({alpha:0}, animtime).wait(delay).call(stopAll);
tweenAray.push(currentTween)
//console.log("fired");
function stopAll(){
playAutoOut();
leaves_anim.gotoAndStop(0);
snow_anim.gotoAndStop(0);
}
}
}
}
我設置currentTween的全局變量,那麼:
currentTween = createjs.Tween.get(target).to({alpha:.7}, animtime).wait(800).call(callHandler);
則:
removeTweens(currentTween);
嘗試設置的陣列 - tweenAray.push(currentTween)
tweenAray.removeTweens(currentTween)
另外 createjs.Tween.removeAllTweens();
即使
createjs.Tween.removeAllTweens = function() {
var tweens = createjs.Tween._tweens;
for (var i=tweens.length-1; i>=0; i--) {
tweens[i]._paused = true;
tweens.splice(i,1);
}
};
沒有反應或我得到的錯誤 我從Flash CS6
任何指針出口?
乾杯
有沒有人有任何想法? 在想,也許使用時間軸補間,我將能夠阻止內的所有定時器等? – Roy