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

Help with on click go to website

New Here ,
Sep 29, 2020 Sep 29, 2020

Hi,

 

I'm trying to create a HTML5 web banner ad. I need to have a transparent button on the top layer with an action set to load the target URL. However, when I test or publish, the button doesn't work. It doesn't even appear to be there when I hover over the stage.

 

This is the code I am using:


var _this = this;
/*
Clicking on the specified symbol instance executes a function.
*/
_this.CTA.on('click', function(){
/*
Loads the URL in a new browser window.
*/
window.open('http://www.adobe.com', '_blank');
});

 

TOPICS
ActionScript , Code , Error , How to
226
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 29, 2020 Sep 29, 2020

After a bit of research, it appears as though it is being affected by having no fill on the button shape. I have had to add a 1% transparency to get the button to work. Does anyone know of a tidier way of doing 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
Community Expert ,
Sep 29, 2020 Sep 29, 2020
LATEST

Hi.

 

To effectively create an invisible button:

- Draw a shape;

- Convert it to a Button symbol;

- Move the shape to the Hit frame;

- Make sure the other frames are empty.

 

adobe_animate_make_an_invisible_button.gif

 

I hope it helps.

 

Regards,

JC

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