Search the Community
Showing results for tags 'twenmax'.
-
hi Greensock A few questions reagrding killAll() 1) Where did the last parameter go? In Flash : killAll(complete:Boolean = false, tweens:Boolean = true, delayedCalls:Boolean = true):void vs. Docs : killAll(complete:Boolean = false, tweens:Boolean = true, delayedCalls:Boolean = true, timelines:Boolean = true):void 2) TimelineMaxs onComplete fires after TweenMax.killAll();??? package { import flash.display.Sprite; import com.greensock.TweenMax; import com.greensock.TimelineMax; import com.greensock.plugins.*; import com.greensock.easing.*; import com.greensock.events.TweenEvent; TweenPlugin.activate([ScalePlugin]); import flash.display.MovieClip; public class Main extends Sprite { public function Main() { // constructor code super(); Create(); } private function Create() { var arr:Array = new Array(); var Time:Number=2; for (var i:int=0; i<10; i++) { var m:MovieClip = new mc(); this.addChild(m); m.x = 40+(25*i); m.y=50; arr.push(m); } // solo tween var TM:MovieClip = new mc(); this.addChild; TM.x=40; TM.y=100; TweenMax.to(TM,6,{scale:2, ease:Linear.easeNone, onStartListener:ScaleTM, onComplete:CompleteTM }); // timeline var TL:TimelineMax = new TimelineMax({ onComplete:CompleteTL }); TL.insertMultiple(TweenMax.allTo(arr, Time, {scale:2, ease:Linear.easeNone, onStartListener:ScaleTL }, Time-0.5), 0); // delayed kill TweenMax.delayedCall(4,Kill); } private function ScaleTM(e:TweenEvent): void { trace('onStartListener: ScaleTM'); } private function CompleteTM() { trace('CompleteTM'); } private function ScaleTL(e:TweenEvent): void { trace('onStartListener: ScaleTL'); } private function CompleteTL() { trace('CompleteTL'); } private function Kill() { trace('Kill'); TweenMax.killAll( } } } trace is:onStartListener: ScaleTM onStartListener: ScaleTL onStartListener: ScaleTL onStartListener: ScaleTL Kill CompleteTL After killAll: As U can see TimelineMax onComplete fires but TweenMax onComplete dosn't