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

Navigate back through timeline

New Here ,
Feb 07, 2017 Feb 07, 2017

Hello,

I have an interactive HTML5 Canvas component built in Adobe Animate with a number of labelled "pages" on the timeline. On each page there are a number of options to choose which page to move to (using gotoAndPlay) so there a few 'routes' through. This is all working fine, but what I am struggling with is this: I would like a "Go Back" button that would take you back through the route you have chosen. I'm guessing this would involve recording a list of variables but my coding skills aren't robust enough. Any suggestions would be appreciated?

Many thanks!

231
Translate
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

LEGEND , Feb 07, 2017 Feb 07, 2017

Somewhere in your initialization section...

myHistory = [];

In your navigation button handler...

myHistory.push("name of the label that's being navigated to");

In your back button handler...

this.gotoAndPlay(myHistory.pop());

Translate
LEGEND ,
Feb 07, 2017 Feb 07, 2017

Somewhere in your initialization section...

myHistory = [];

In your navigation button handler...

myHistory.push("name of the label that's being navigated to");

In your back button handler...

this.gotoAndPlay(myHistory.pop());

Translate
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 ,
Feb 07, 2017 Feb 07, 2017

That's great, thank you. I'm implementing  it at the moment but it looks like it's working. Thank you!

Translate
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 ,
Feb 08, 2017 Feb 08, 2017
LATEST

It works! Thanks again.

Translate
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