2015-04-02 76 views
0

在onUpdate上使用updateTo時,onComplete未觸發。如果我刪除updateTo行onComplete被觸發,因爲它應該。在onUpdate上使用updateTo時,GSAP/TweenLite/TweenMax onComplete未觸發

我正在使用GSAP的最新更新。

private function fingerLoop():void 
{ 
    // Set the gotoPlanet var 

    TweenMax.to(finger, 1, { x:gotoPlanet.x, y:gotoPlanet.y, onComplete:fingerLoop, onUpdate:moveFinger, onUpdateParams:["{self}", gotoPlanet] }); 
} 

private function moveFinger(tween, gotoPlanet):void 
{ 
    tween.updateTo({x:gotoPlanet.x, y:gotoPlanet.y}, false); 
} 
+0

這個問題可能會更適合於使用GreenSock論壇 – BadFeelingAboutThis 2015-04-02 22:30:53

回答

0

也許你可以添加一個onComplete處理程序的調用updateTo(),像這樣:

tween.updateTo({x:gotoPlanet.x, y:gotoPlanet.y, onComplete:fingerLoop}, false); 
+0

好主意。我找到了一個解決方法。當對象接近目標對象並且再次啓動時,我會殺死補間以引導其他對象。你的方式似乎很有趣。我會嘗試。 – Ghelle 2015-04-24 20:52:44

+0

這沒有奏效。 Greensock爲這種任務提供了名爲DinamcProps的俱樂部成員插件。所以我認爲這個可用性在類文件中被阻止。 – Ghelle 2015-05-04 21:14:17

相關問題