# Right click is it possible

**URL:** <https://forum.kirupa.com/t/right-click-is-it-possible/12471>\
**Category:** Uncategorized\
**Created:** [January 31, 2003, 5:57pm UTC](https://forum.kirupa.com/t/right-click-is-it-possible/12471 "2003-01-31T17:57:11Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 31, 2003, 11:44pm UTC](https://forum.kirupa.com/t/right-click-is-it-possible/12471/21 "2003-01-31T23:44:06Z")

</div>

I wouldnt get your hopes up too high about all of this though. It isnt infallible. For instance, in right clicking, all mouse position detection is halted (and the movie must first be focused through clicking before its even detected at all). Also right-clicking and dragging a little will change tha value of Key.isDown(2) to false. Heres an example of a menu used with this. Play around with it a little and you can see what problems may arise.

By the way, that code does NOT stop the menu from coming up. You cant stop that - atleast not on any web page or within Flash (certain projector utilities allow you to bypass it). This just adds an event which lets any object listening to the Mouse object recieve an onRightMouseDown even handle just like the regular onMouseDown event. In detecting that, you can do whatever you want, even make your own menu to trail off the existing Flash menu… ie…

[http://userpages.umbc.edu/~tmccau1/flash/rightclickmenu.html](http://userpages.umbc.edu/~tmccau1/flash/rightclickmenu.html)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 31, 2003, 11:50pm UTC](https://forum.kirupa.com/t/right-click-is-it-possible/12471/22 "2003-01-31T23:50:38Z")

</div>

We are making this to difficult try on frame 1:

stop();  
this.onEnterFrame = function(){  
if (Key.isDown(2)){  
getURL(“[http://www.yahoo.com](http://www.yahoo.com)”, “\_blank”);  
gotoAndPlay(2);  
}  
}  
Ya gotta go to another frame or else it’ll pop up a bunch of windows

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 31, 2003, 11:55pm UTC](https://forum.kirupa.com/t/right-click-is-it-possible/12471/23 "2003-01-31T23:55:48Z")

</div>

the point of the

```auto
	if (Key.isDown(2) && Key.isDown(2) != this.rightWasDown) Mouse.broadCastMessage("onRightMouseDown");
	this.rightWasDown = Key.isDown(2);

```

was to prevent that repitition

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 1, 2003, 12:10am UTC](https://forum.kirupa.com/t/right-click-is-it-possible/12471/24 "2003-02-01T00:10:00Z")

</div>

Thanks a bunch guys I will look into it further when I get home today.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 1, 2003, 1:19am UTC](https://forum.kirupa.com/t/right-click-is-it-possible/12471/25 "2003-02-01T01:19:10Z")

</div>

sen:  
I know but it had a bug…and I thought about it and got cofused and scared so I just cheated…

:We are the Knights who say NI:

[Previous page](https://forum.kirupa.com/t/right-click-is-it-possible/12471.md?page=1)
