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

How to get html publish to loop

New Here ,
May 03, 2023 May 03, 2023

Copy link to clipboard

Copied

Hi there,

I'm very new to the coding side of animate, and am struggling well out of my comfort zone 😄

I've made a digital interactive picturebook dummy, with buttons to go forward and back, as well as an interactive turning wheel to demo what the picturebok interactivity would be. When the user gets to the last page (frame), and clicks on the back to the start button, I'd like the user to be able to run through the book again. Currently on the last page I'm using:


var _this = this;
/*
Clicking on the specified symbol instance executes a function.
*/
_this.nextbutton.on('click', function(){
/*
Moves the playhead to the specified frame number in the timeline and stops the movie.
Can be used on the main timeline or on movie clip timelines.
*/
_this.gotoAndStop(0);
});

 

And we do go back to the first page, but none of the buttons work any more so we're just stuck on the front cover again.

how do I create a loop please?

 

Views

158

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 ,
May 03, 2023 May 03, 2023

Copy link to clipboard

Copied

LATEST

you have to be careful to not repeat code that was previously used and still active.  that's most likely what's causing your problem.

 

you can get more info by opening your browser's developer console.

 

lesson 1 - https://youtu.be/PBDQN9CQSeI

lesson 2 - https://youtu.be/KJEl0OenGUY

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