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

Right Click?

New Here ,
Sep 21, 2013 Sep 21, 2013

So I want to dissapear or reappear a object by right click (the objeck has been given name as:wow)

Can anybody help me with the syntax. If it's left click, I can figure it out. But since this is right click, I can.

TOPICS
ActionScript
769
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

correct answers 1 Correct answer

Engaged , Sep 28, 2013 Sep 28, 2013

Right click is supported in AIR and Flash Player 11.2 and above. Example:

mySprite.addEventListener(MouseEvent.RIGHT_CLICK, onRightClick);

function onRightClick(e:MouseEvent):void {

          mySprite.transform.colorTransform = new ColorTransform(0, 0, 0, 1, 255); // make it red!

}

I've found that it doesn't work in the Flash IDE (test movie), strangely.

-Aaron

Translate
Community Expert ,
Sep 21, 2013 Sep 21, 2013

use something else.  the right click is used by flash player for the context menu.

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
Engaged ,
Sep 28, 2013 Sep 28, 2013

Right click is supported in AIR and Flash Player 11.2 and above. Example:

mySprite.addEventListener(MouseEvent.RIGHT_CLICK, onRightClick);

function onRightClick(e:MouseEvent):void {

          mySprite.transform.colorTransform = new ColorTransform(0, 0, 0, 1, 255); // make it red!

}

I've found that it doesn't work in the Flash IDE (test movie), strangely.

-Aaron

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 28, 2013 Sep 28, 2013
LATEST

good info!  thank you.

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