Skip to main content
Participant
January 29, 2020
Question

HTML5 Canvas banner, button not clickable

  • January 29, 2020
  • 1 reply
  • 704 views

Hi,

 

I am trying to set up a 300x600 HTML5 banner, but whatever I do the button isn't clickable. I have tried to put the layer at the very top and tried this approach:

 

  1. Create a new layer and draw a rectangle inside it with 300x600 at position 0,0.
  2. Then, right click the rectangle and convert it to a Button symbol.
  3. Double-click the rectangle then drag and drop the frame to the "Hit" event.
  4. Go back to the Scene 1, set the instance name of the Objet.
  5. Select the layer of the button then go to Window > Actions
  6. Use Wizard: Go to Webpage, On Mouse Click, select instance name (from step 4)

 

I have also tried by making a movie clip in my Scene 1 and inside the movie clip I'd make two layers, one with the code and one with the button area.

 

Nothing so far is working, as far as my publishing settings goes, I am using the same ones as another project which is working...

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
January 30, 2020

on step 5, select the button and then use the wizard.  or select Objet's keyframe and add:

 

this.Objet.addEventListener("click",ObjetF.bind(this));

function ObjetF(){
alert(this);

}