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

Navigate back through timeline

New Here ,
Feb 07, 2017 Feb 07, 2017

Copy link to clipboard

Copied

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!

Views

194

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

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());

Votes

Translate

Translate
LEGEND ,
Feb 07, 2017 Feb 07, 2017

Copy link to clipboard

Copied

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());

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

Copy link to clipboard

Copied

That's great, thank you. I'm implementing  it at the moment but it looks like it's working. 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
New Here ,
Feb 08, 2017 Feb 08, 2017

Copy link to clipboard

Copied

LATEST

It works! Thanks again.

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