Copy link to clipboard
Copied
I have 4 frames with next/prev frame buttons using action script. Everything works except on the 4th frame if I decide to go back to the 3rd frame, I cannot go forward again unless I go all the way back to the 1st frame. Once I arrive back to the 1st frame, I can do whetever I want again unless I arrive at the 4th frame again, then it's the same deal, need to go back to 1st frame to do what I want again.
What's going on?
if firstdown on its own layer with one keyframe at frame 70 and an empty keyframe at frame 73, you can expect the problem you're seeing: when you advance from frame 72 to 73, firstdown no longer exists and its code is removed. when you then return to 72, firstdown exists again but its code is not recreated.
one way to remedy isdon't remove framedown at frame 73. assign its visible property to false:
firstdown.visible = false;
then when you return to frame 72, it will still be false so
...Copy link to clipboard
Copied
are you using the same button for some or all your next frame advances and the same button for some or all your prev frame changes?
if yes, you probably are failing to remove listeners.
Copy link to clipboard
Copied
Thanks for getting back to me. Ok, how can I do that? This is my 'next frame' button which is on frames 70-72 (I also have a close button to transport to frame 69 and I'm not sure if that's relevant):
And my 'previous frame' button which is on frames 71-73:
So do I make any adjustments to these or do I do something else?
Copy link to clipboard
Copied
if firstdown on its own layer with one keyframe at frame 70 and an empty keyframe at frame 73, you can expect the problem you're seeing: when you advance from frame 72 to 73, firstdown no longer exists and its code is removed. when you then return to 72, firstdown exists again but its code is not recreated.
one way to remedy isdon't remove framedown at frame 73. assign its visible property to false:
firstdown.visible = false;
then when you return to frame 72, it will still be false so add another keyframe at 72 and use:
firstdown.visible = true;
Copy link to clipboard
Copied
It worked, I have never felt more relieved. Really appreciate the help, thank you.
Copy link to clipboard
Copied
you're welcome.
Copy link to clipboard
Copied
Oh man, I just ran into the same issue again. (This time, the direction is backwards). Basically did everything the same as before using all the same two buttons (firstup to go back, firstdown to goforward), just all in reverse, yet somehow it still doesn't allow me to go backwards anymore once I hit 74, until back to 77. What was the listeners thing you mentioned before? Evidently, I am not a coder.
Copy link to clipboard
Copied
is firstdown calling both fl_ClickToGoToNextFrame and fl_ClickToGoToNextFrame_7?
Copy link to clipboard
Copied
Yes
Copy link to clipboard
Copied
that's a problem. either use a different button or remove one the event listeners.
but you're probably adding more complexity to your project and causing more problems than just that.