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