0
我一直在無情地試圖讓我的補間在ActionScript 3中正常工作,但與研究我已經發現,凍結中期動畫的原因是因爲垃圾收集器...我已經嘗試了這兩種方法,並嘗試將它放入我的文檔類中,但它仍然會隨機凍結。它看起來像我可能會去像吐溫精簡版,但是這麼簡單的東西不應該這麼難......動作3:吐溫停止動畫中間...可能是垃圾收集器
嘗試1:
function createScrollingMC(mc:MovieClip, stageLeft:int, stageRight:int, durationSecs:int) {
var scrollingTween01:Tween;
var multiplyer:int = 100;
scrollingTween01 = new Tween(mc, "x", None.easeNone, stageLeft - mc.width, stageRight + mc.width, durationSecs * multiplyer, true);
scrollingTween01.looping = true;
}
createScrollingMC(Cloud_01, 0, 1024, 1);
createScrollingMC(Cloud_02, 0, 1024, 2);
createScrollingMC(Cloud_03, 0, 1024, 3);
createScrollingMC(Cloud_04, 0, 1024, 4);
嘗試2:
var scrollingTween01:Tween;
function createScrollingMC(mc:MovieClip, stageLeft:int, stageRight:int, durationSecs:int) {
var multiplyer:int = 100;
scrollingTween01 = new Tween(mc, "x", None.easeNone, stageLeft - mc.width, stageRight + mc.width, durationSecs * multiplyer, true);
scrollingTween01.looping = true;
}
createScrollingMC(Cloud_01, 0, 1024, 1);
createScrollingMC(Cloud_02, 0, 1024, 2);
createScrollingMC(Cloud_03, 0, 1024, 3);
createScrollingMC(Cloud_04, 0, 1024, 4);
感謝您的回覆,而生成的函數內部吐溫似乎沒有爲我工作,你創建一個新補的建議並但是當我創造它的功能以外的工作,這導致我創造4每個動畫片段的功能,但它的工作原理,我打算更好地簡化功能。 感謝您的幫助:D – Anim8