Skip to main content
LBoland
Participant
September 29, 2020
질문

Help with on click go to website

  • September 29, 2020
  • 2 답변들
  • 251 조회

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

 

이 주제는 답변이 닫혔습니다.

2 답변

JoãoCésar17023019
Community Expert
Community Expert
September 29, 2020

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.

 

 

I hope it helps.

 

Regards,

JC

LBoland
LBoland작성자
Participant
September 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?