How to animate an item in the background across the screen only once

edited September 2012 in Development
Hello Selim,
I was looking at your page on animating background items here - http://gamequeryjs.com/documentation/first-tutorial/first-tutorial-step-1/, which makes a lot of sense if I wanted a continous sequence. But I have an additional sprite that I want to animate through the screen only one time and not cycle back into the screen again. What is the simplist way we can achieve that affect.

I tried placing type: $.gQ.ANIMATION_ONCE, on the new $.gQ.Animation I am talking about, but its still cycling the item back into the screen. Do you already have any examples of this?

Thanks!

Comments

  • edited September 2012
    Nevermind, gQ gets better and better as I understand that I can stop or remove animations with the help of the jQuery API and looking at activities under firebug.
    I also now understand that gQ.ANIMATION_ONCE is for multi-frame animations.

    Also, within a registered callback function, I see how its possible to create a conditional statement based on some value, such as with time or game points, to determine when and how often something something travels across the screen.

    Thanks!
Sign In or Register to comment.