Jump to content

about animation.play and how to start the loop from a specific frame


borispulido
 Share

Recommended Posts

Hi Guys!

 

Well thats the problem i have to solve, because I need to continue my animation loop from a specific frame (the last frame when i stop animation from an onDown event ) i can get my animation last frame, but animation.play dont receive that parameter to start the loop from that frame. So what i can do?

 

I've been thinking change the order of  frames, ordering a new array, beginning with that specific frame then update the frames array  then play animation.....but i dont know just an idea I just had.

 

sorry for my English, google translator at its best. Cheers!

 

Link to comment
Share on other sites

sorry let me explain better with a example:

 

If you have a jetfighter whose animation roll right with a onDown event, your animation.add for roll have

the array frames [0,1,2,3,4,5]. so when you press RIGHT then animation.play begins so starts looping from 0, so if the middle of the roll you release the RIGHT key, then animation.stop stop your animation, thats fine your jet stays in that position frame (for example frame 3), let says in half roll, good........but this is the problem, if you want to CONTINUE that roll to finish the "turn" when you press RIGHT again the animation start from the beginning not from the frame where it left off.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...