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

Frame not showing all content when gone to via button

New Here ,
Dec 12, 2016 Dec 12, 2016

Hi. I'm having a problem with my school project where when I try to go to frame 20, it just shows the blue background rather than all of the content that is on the frame. I can't see anything wrong with my code, and I just frankly can't find a solution, can anyone help?

The screenshot above shows the main page. The first button is the button I am attempting to use to jump to the next frame.

This is frame 20, as you can see, there is a lot more on there than a blue background.

This is the code I have used for the button:

this.stop()

this.btnCampA.addEventListener("click", fl_ClickToGoToAndStopAtFrame_2.bind(this));

function fl_ClickToGoToAndStopAtFrame_2()

{

this.gotoAndStop(20);

}

this.btnGWA.addEventListener("click", fl_ClickToGoToWebPage);

function fl_ClickToGoToWebPage() {

window.open("https://www.games-workshop.com/", "_blank");

}

this.btnDOWIII.addEventListener("click", fl_ClickToGoToWebPage_2);

function fl_ClickToGoToWebPage_2() {

window.open("https://www.dawnofwar.com/", "_blank");

}

157
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 , Dec 12, 2016 Dec 12, 2016

The playback head in your second screen image is on frame 21, not 20. When working with html5 in Animate, the frame numbering is different that what is shown on the stage. The first frame is "0", not "1". So, to get to frame 21, you need to say "this.gotoAndStop(22);"

When you use Test Movie... there is an alert that shows up that tells you about this. Unfortunately, it is usually covered by the browser window that opens on top of it.

Translate
LEGEND ,
Dec 12, 2016 Dec 12, 2016
LATEST

The playback head in your second screen image is on frame 21, not 20. When working with html5 in Animate, the frame numbering is different that what is shown on the stage. The first frame is "0", not "1". So, to get to frame 21, you need to say "this.gotoAndStop(22);"

When you use Test Movie... there is an alert that shows up that tells you about this. Unfortunately, it is usually covered by the browser window that opens on top of it.

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