If and else both running when replaying a previous frame in animate cc HTML5
Hi everyone
So I have an animation which has several frames. There is some code using drag and drop in a certain frame (say frame number 100). Finally, there is a replay button, clicking on which takes the user back to the first frame (There is simply a 'this.gotoAndPlay(5)' attached to the event listener of this replay button).
This is where all the problems begin.
There is a part of code on frame number 100 which involves 'if' and 'else'. Everything works fine the first time the frame is played.
However, when, after pressing the replay button, the frame is played again, the part of code inside the 'else' block is executed even when the part inside the 'if' block is executed!!
In general, going back to previous frames create lots of troubles. Things that work perfectly while the frame is being played first time simply defy logic when being replayed.
Any help would be appreciated!
