Skip to main content
weboramaes
Participant
February 15, 2017
Answered

AnimateCC 2017 Right Button behauvior

  • February 15, 2017
  • 1 reply
  • 566 views

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

    This topic has been closed for replies.
    Correct answer weboramaes

    I think this is the best answer:

    canvas = document.getElementById("canvas");

    canvas.addEventListener('click', clickFunction);

    function clickFunction(e){

       ///Action here

    }

    1 reply

    Participating Frequently
    February 15, 2017

    you could listen for the contextmenu event, or use the mouseevent nativeEvent.button to determine which button was pressed.

    See this discussion for examples:

    Flash CC Canvas disable right click.

    weboramaes
    weboramaesAuthorCorrect answer
    Participant
    February 15, 2017

    I think this is the best answer:

    canvas = document.getElementById("canvas");

    canvas.addEventListener('click', clickFunction);

    function clickFunction(e){

       ///Action here

    }