Copy link to clipboard
Copied
Hi,
I´m making a banner with Adobe Animate CC 2017, compile in 16.0.0112
It is a simple Ad with a button and a movieclip acting as a button, so when you click the Ad takes you to Adobe.
My question is this: Is the right button behaving ok?
I think the right click button is behaving as the left one (it shouldn´t).
Don´t know if this is a bug or I´m doing something wrong. I think click on the Ad with right button should show "Save as..." and all this menu.
My code goes as follows:
//Button
this.button.addEventListener("click", fl_ClickToGoToWebPage);
function fl_ClickToGoToWebPage() {
window.open("http://www.adobe.com", "_blank");
}
//Movieclip
this.cuad.cursor = "pointer";
this.cuad.addEventListener("click", fl_ClickToGoToWebPage_2);
function fl_ClickToGoToWebPage_2() {
window.open("http://www.adobe.com", "_blank");
}
this.stop();
You can see the Ad online here: bug_rightbutton
Also you can download it here http://creative-weborama.com/wp-content/trials/bug_rightbutton.zip
Thank you very much
I think this is the best answer:
canvas = document.getElementById("canvas");
canvas.addEventListener('click', clickFunction);
function clickFunction(e){
///Action here
}
Copy link to clipboard
Copied
you could listen for the contextmenu event, or use the mouseevent nativeEvent.button to determine which button was pressed.
See this discussion for examples:
Copy link to clipboard
Copied
I think this is the best answer:
canvas = document.getElementById("canvas");
canvas.addEventListener('click', clickFunction);
function clickFunction(e){
///Action here
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now