Copy link to clipboard
Copied
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.
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
Copy link to clipboard
Copied
use something else. the right click is used by flash player for the context menu.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
good info! thank you.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now