Hi, I want to use the TimelineLite class when I press a button. I have this code in the main timeline:
Code:
This code allows me to send a movieclip called my_mc to a frame that I want with a time delay. How can I do to call the function by pressing a button and not with a delayed call?Code:TweenLite.delayedCall(0, myFunction, ["param1", 2]); function myFunction(param1:String, param2:Number):void { var timeline:TimelineLite = new TimelineLite(); timeline.append( new TweenLite(my_mc, 0, {y:"mouseY",ease:Circ.easeOut, onComplete: goFrame}) ); } function goFrame() { my_mc.gotoAndStop(5); }
Thanks


Reply With Quote