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

HTML5 Canvas banner, button not clickable

New Here ,
Jan 29, 2020 Jan 29, 2020

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...

TOPICS
How to , Other
653
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 ,
Jan 30, 2020 Jan 30, 2020
LATEST

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);

}

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