I'm trying to solve a problem I have in Flash CC AS3 regarding button usage. I'll try and make this as easy to explain as I can.
I currently have two sets of frames that have motion in them: one of a man walking slowly (frames 1-30) and the next is the same man but walking much faster (frames 31-60). For both sets of animations, the start and end frames are exactly the same, so a seamless transition can be enabled if the transition happens at the end point of the currently viewed animation.
The sets work by themselves by simply playing from their start frame till the end frame, where AS code makes them stop and then jump back to the original start point and repeat, on endless loop. I have a button that, when pushed, jumps to the start point of the next animation, where the new animation is now played. EG the man is walking, I press the button, now the man is walking faster.
The problem is that when I push the button, the animation instantly changes from whatever frame you are currently on to the new start point, and this creates a 'cut' effect which looks awful because of the skipped frames. How would I be able to make it so that when the button is pushed, the remaining frames finish playing before jumping to the new animation? IE The man is mid walk at the 17th frame, and the user pushes the button. The animation plays out to the 30th frame before jumping over to play the 31st frame of the new loop.
I've tried toying around with an if statement, but I can't find the proper commands to solve this issue. Any help would be much appreciated
TL;DR Once resolved, the animation should perform as follows: Frames 1-30 are playing in a seamless loop. When I press a button, the animation will continue to play until Frame 30, where it will then begin to play Frames 31-60 in a loop.
Any help would be much appreciated!