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

Problems with Buttons appearing in HTML5

New Here ,
Sep 16, 2018 Sep 16, 2018

Hi.

I'm currently doing a assessment on adobe animate and I'm using buttons so that when you press them an animation starts. I've coded everything but when I test it in HTML5 none of the buttons appear. This is probably a easy fix but I'm really new to Adobe Animate so I have no clue what to do. This is what my code looks like.

//add event to check for buttons being clicked

this.btnPlayCough.addEventListener("click", playCough.bind(this));

this.btnPlayHandshake.addEventListener("click", playHandshake.bind(this));

this.btnPlayInfectedSurface.addEventListener("click", playInfectedSurface.bind(this));

this.btnPlayBkgd.addEventListener("click", playBkgd.bind(this));

function playCough() {

this.mcCough.gotoAndPlay("start");

}

function playHandshake() {

this.mcHandshake.gotoAndPlay("start");

}

function playInfectedSurface() {

this.mcSurface.gotoAndPlay("start");

}

function playBkgd() {

this.mcBKGD.gotoAndPlay("start");

}

//add event to check for stop buttons being clicked

this.btnStopCough.addEventListener("click", stopCough.bind(this));

this.btnStopHandshake.addEventListener("click", stopHandshake.bind(this));

this.btnStopInfectedSurface.addEventListener("click", stopInfectedSurface.bind(this));

this.btnStopBkgd.addEventListener("click", stopBkgd.bind(this));

//functions to stop animations

function stopCough() {

this.mcCough.stop();

}

function stopHandshake() {

this.mcHandshake.stop();

}

function stopInfectedSurface() {

this.mcSurface.stop();

}

function stopBkgd() {

this.mcBKGD.stop();

}

all the buttons and Movie clips are correct and I have the gotoandplay and what not on all the movie clips I'm using but I don't know whats wrong.

204
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 , Sep 17, 2018 Sep 17, 2018

Depending on the browser, the error console may not list errors that occurred before the console was opened. So open the console, refresh the page, then look for errors.

Translate
Community Expert ,
Sep 16, 2018 Sep 16, 2018

open your console and check the error message.

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 ,
Sep 16, 2018 Sep 16, 2018

Theres no error message

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
Community Expert ,
Sep 16, 2018 Sep 16, 2018

attach a screenshot of your console showing there's no error message.

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
LEGEND ,
Sep 17, 2018 Sep 17, 2018
LATEST

Depending on the browser, the error console may not list errors that occurred before the console was opened. So open the console, refresh the page, then look for errors.

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