cr4y Posted February 2, 2010 Share Posted February 2, 2010 I'm writing a game. A main character, "board.player" should be visible always in center of the screen. To make life easier I have done something like: addEventListener(Event.ENTER_FRAME,erf); function erf(ev:Event){ board.x= -board.player.x } TweenMax.to(board.player, 2, {x:"+100"}); Now I can move player, and he is still in center of the screen. The problem is that "player" is shaking (his tween is no fluent). It seems like "erf" is running before TweenMax. How could I change it? (I was trying to change a priority of ENTER_FRAME listener, but it didn't help). Thanks in advance Link to comment Share on other sites More sharing options...
GreenSock Posted February 2, 2010 Share Posted February 2, 2010 What priority did you change the listener to? A lower one, right? You could use an onUpdate to call your method too. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now