Jump to content
Search Community

bonassus

Members
  • Posts

    51
  • Joined

  • Last visited

Everything posted by bonassus

  1. Would Someone please help me i'm stuck. I'm new to as3 and need a little help. I have set up a test file with an mc ball and set up a simple tween using tweenlite to move the ball 100 pixels. I am using the onComplete parameter to run a function called myFunction. This works. What I would like to do is be able to trigger more then one function with the completion of the tween so that myfunction and myOtherfunction both run. I tried to set up an addEventListener to respond to the onComplete but im not sure what to attach it to(where i have the ? in the code). Am I going about this the wrong way? can someone point me in the right direction? please see code below: package { import com.greensock.*; import com.greensock.easing.*; import flash.display.MovieClip public class Test extends MovieClip { public function Test() { var ball:Ball = new Ball(); ball.x = 200; ball.y = 200; addChild(ball); TweenLite.to(ball, 1, {x:200, y:100, onComplete:myFunction}); function myFunction():void { trace("tween finished"); } ?.addEventListener(TweenEvent, myOtherFunction); function myOtherFunction():void { trace("Other tween finished"); } } } }
×
×
  • Create New...