Skip to main content
Participant
September 16, 2018
Answered

Problems with Buttons appearing in HTML5

  • September 16, 2018
  • 1 reply
  • 264 views

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.

This topic has been closed for replies.
Correct answer ClayUUID

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.

1 reply

kglad
Community Expert
Community Expert
September 16, 2018

open your console and check the error message.

Participant
September 16, 2018

Theres no error message

kglad
Community Expert
Community Expert
September 17, 2018

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