• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Buttons issue- Animate

New Here ,
Jun 13, 2020 Jun 13, 2020

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?

Views

487

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 03, 2020 Jul 03, 2020

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

...

Votes

Translate

Translate
Community Expert ,
Jul 02, 2020 Jul 02, 2020

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.  

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 02, 2020 Jul 02, 2020

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):

Capture.JPG

And my 'previous frame' button which is on frames 71-73:

Capture2.JPG

So do I make any adjustments to these or do I do something else?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 03, 2020 Jul 03, 2020

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;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 03, 2020 Jul 03, 2020

Copy link to clipboard

Copied

It worked, I have never felt more relieved. Really appreciate the help, thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 04, 2020 Jul 04, 2020

Copy link to clipboard

Copied

you're welcome.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 08, 2020 Jul 08, 2020

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.

Henriquey_0-1594247266780.jpeg

Deux.JPGTrois.JPGQuatre.JPG

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 09, 2020 Jul 09, 2020

Copy link to clipboard

Copied

is firstdown calling both fl_ClickToGoToNextFrame and fl_ClickToGoToNextFrame_7?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 09, 2020 Jul 09, 2020

Copy link to clipboard

Copied

Yes

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 09, 2020 Jul 09, 2020

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines