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

Next and Previous buttons not working in .oam file

Explorer ,
Sep 11, 2017 Sep 11, 2017

Copy link to clipboard

Copied

I built a slideshow in Animate CC using the HTML5 Canvas with next and previous buttons and everything works fine when I test in bowser from Animate. However, when I publish the .oam file and place into Muse the buttons no longer work and I have no idea why. I have another Animate slideshow in the same Muse file that uses a button for each slide and it works perfect so I am guessing my problem is with the code running the next/prev buttons.

So what seems to this novice should have been a easy build turn out to be not so easy....

The slideshow has 20 slides, each on it's own layer so that as one moves out you can see the other move in...each animates into and out of a mask. There is a next and previous button which plays the slide's animation. Click the next button and the current slide animates out and the next slide animates in and stops in the middle of the mask. Step and repeat.

The next button was easy enough...here is the code for it which is on frame one...

this.next_img_btn.addEventListener("click", fl_ClickToGoToAndPlayFromFrame_2.bind(this));

function fl_ClickToGoToAndPlayFromFrame_2()

{

  this.gotoAndPlay('Next');

}

I tried to build the previous button the same way, replace "next" with "previous", "prev", etc. that didn't work. After a while and give up on that approach and instead placed the following code at each stop command in the time line....

this.stop();

this.pre_img_btn.addEventListener("click", fl_ClickToGoToAndPlayFromFrame_5.bind(this));

function fl_ClickToGoToAndPlayFromFrame_5()

{

  this.gotoAndPlay(1);

}

The frame number jumps to the beginning of the previous slide's animation starting point. It's not pretty but it works fine when testing in bowser via animate. I publish the .oam, place in Muse and both buttons stop working...in Muse I tested by going to "preview" mode and via "preview page in bowser".

I don't know why it's not working in Muse. I'm not getting any errors via the compiler when publishing from Animate so I am going to cross post this to the Muse forum. Any insights are very much appreciated.

Views

140

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
no replies

Have something to add?

Join the conversation