Copy link to clipboard
Copied
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');
});
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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
Find more inspiration, events, and resources on the new Adobe Community
Explore Now