PDA

View Full Version : Remove right click menu with JavaScript?


Cyanide
08-14-2003, 11:49 PM
Is there any method in javascript to disable the right-click menu? I've already got a way to get flash to take an action when the user right clicks. I just need to get flash's right click menu out of the way. BTW, it would have to work in IE and Mozilla.

Any help is appriciated.

SundanceKid
08-20-2003, 06:38 AM
Hi!
Have you tried to put this
Stage.showMenu = false;
in a action on _root

-Sundance Kid-

fgf
08-20-2003, 06:41 AM
there is no way to do it for flash.

There are a few almost work arounds but nothing that is a total solution.

I think I heard tell that this may change in the next version but don't quote me.

There is a way to do it for java script.
oncontextmenu=return false; or something similar but that won't affect the flash player

fgf

renzo
08-30-2003, 06:18 PM
i think that can help its in html

<script language=JavaScript>
<!--

//www.geocites.com/renzo0001 did it
var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document. onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontext menu=clickIE;}

document.oncontextmenu=new Function("return false")
// -->
</script>
------------------------------------------
--------------------------------
hope i helped