r/actionscript • • Aug 02 '23

RIGHT_MOUSE_UP

Hi.

What's. . . up with RIGHT_MOUSE_UP?

import flash.events.Event;
import flash.display.*;
import flash.events.MouseEvent;

stage.addEventListener(MouseEvent.RIGHT_MOUSE_DOWN, rightMouseDown);
function rightMouseDown(e: MouseEvent): void {
    trace("right mouse down");
}

stage.addEventListener(MouseEvent.RIGHT_MOUSE_UP, rightMouseUp);
function rightMouseUp(e: MouseEvent): void {
    trace("right mouse up");
}

It works in AIR but not Player 32.

Thanks in advance.

1 Upvotes

3 comments sorted by

View all comments

Show parent comment

1

u/B0zwa Aug 03 '23

Thanks' for the quick reply.

Please don't think I'm trying to MOUSE_DOWN the messenger.
I just want to understand.

With a simple line I can intercept right click with as?

1

u/4as Aug 03 '23

Like I said, you can't intercept right click in Flash Player. However clicking the right mouse button opens the context menu, which you can listen for using the CONTEXT_MENU event.