Go Back   SitePoint Forums > Forum Index > Design Your Site > Flash and Actionscript
Newsletter FAQ Members List Calendar Mark Forums Read

New to SitePoint Forums? Register here for free!

SitePoint Sponsor
 
Reply
 
Thread Tools Display Modes
Old Jul 18, 2003, 01:41   #1
ArticleBot
SitePoint Articles
 
ArticleBot's Avatar
 
Join Date: Apr 2001
Posts: 0
Discussion thread for Flash Script - Disable the User's Right Click Menu

This is a dedicated thread for discussing the SitePoint article 'Flash Script - Disable the User's Right Click Menu'
ArticleBot is offline   Reply With Quote
Old Jul 18, 2003, 01:41   #2
Anonymous
SitePoint Community Guest
 
Posts: n/a
I did what you said and It doesnt work for some reason, can anyone tell me why
  Reply With Quote
Old Jul 18, 2003, 15:08   #3
saraazriel
SitePoint Enthusiast
 
Join Date: Jan 2001
Location: Texas
Posts: 32
It doesn't work for me either. I tried it both with and without quotes, but the menu still pops up. I'm viewing it on the latest version of Internet Explorer with the Flash 6 player installed.

Any ideas?
saraazriel is offline   Reply With Quote
Old Jul 18, 2003, 16:43   #4
saraazriel
SitePoint Enthusiast
 
Join Date: Jan 2001
Location: Texas
Posts: 32
It didn't work for me. Then I realized they are completely wrong. I inserted this code with all the other parameters and it worked just fine:

<PARAM NAME=menu VALUE=false>
saraazriel is offline   Reply With Quote
Old Jul 22, 2003, 05:04   #5
Anonymous
SitePoint Community Guest
 
Posts: n/a
Hi Friends,
I am imran ali from Pakistan(Karachi)please follow the instruction and disable the right click in Flash menu.
Go to flash basic actions>>Fscommand>>commands for standalone player>>Drop Down menu>>select show menu>>Arguments>>False
Export the Swf call in dreamweaver or front page,HTML code<Param name=menu value=false>
Now check it will work.
Everybody happy now!
  Reply With Quote
Old Jul 22, 2003, 05:18   #6
ariansign
SitePoint Member
 
Join Date: Jul 2003
Location: pakistan
Posts: 2
Smile Disable Flash Right Click Easily

Hi Friends,
I am imran ali from Pakistan(Karachi)please follow the instruction and disable the right click in Flash menu.
Go to flash basic actions>>Fscommand>>commands for standalone player>>Drop Down menu>>select show menu>>Arguments>>False
Export the Swf call in dreamweaver or front page,HTML code<Param name=menu value=false>
Now check it will work.
Everybody happy now!
ariansign is offline   Reply With Quote
Old Jul 22, 2003, 05:22   #7
ariansign
SitePoint Member
 
Join Date: Jul 2003
Location: pakistan
Posts: 2
Smile Disable Flash Right click Easily

Hi Friends,
Go to flash basic actions>>Fscommand>>commands for standalone player>>Drop Down menu>>select show menu>>Arguments>>False
Export the Swf call in dreamweaver or front page,HTML code<Param name=menu value=false>
Now check it will work.
Everybody happy now!
ariansign is offline   Reply With Quote
Old Jul 29, 2003, 14:12   #8
Anonymous
SitePoint Community Guest
 
Posts: n/a
include

<param name="menu" value="false">
  Reply With Quote
Old Dec 9, 2003, 19:49   #9
Anonymous
SitePoint Community Guest
 
Posts: n/a
this doesnt help protect text from copy and paste
  Reply With Quote
Old Aug 19, 2004, 05:13   #10
Dave Pusey
SitePoint Community Guest
 
Posts: n/a
>> this doesnt help protect text from copy and paste

It's not supposed to.
  Reply With Quote
Old Aug 21, 2004, 13:53   #11
4walls
SitePoint Community Guest
 
Posts: n/a
This works in IE, but not in Mozilla Firefox.
  Reply With Quote
Old Aug 23, 2004, 19:41   #12
Matt
SitePoint Community Guest
 
Posts: n/a
Try using this code

<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='123' height='123'>
<param name=movie value='movie.swf'>
<param name=quality value=high>
<param name='LOOP' value='false'>
<param name='menu' value='false'>
<embed
src='movie.swf'
quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='123'
height='123'
loop='false'>
</embed>
</object>
  Reply With Quote
Old Oct 23, 2004, 04:37   #13
Query
SitePoint Community Guest
 
Posts: n/a
It Do work for Internet explorer, but i need it to be disabled in my .swf file, so that if i give .swf file to any one, it could not zoom in and out from it.
  Reply With Quote
Old Nov 12, 2004, 01:46   #14
TeDDyBeeR
SitePoint Community Guest
 
Posts: n/a
"Posted by: Matt" Code works for me in IE
The first post code was working on Netscape
So, use both codes i guess to hide the menu :)
  Reply With Quote
Old Nov 17, 2004, 11:52   #15
KKhan
SitePoint Community Guest
 
Posts: n/a
Works in both Mozilla Firebird & IE 6 if, in addition to Matt's code, you include menu='false' in the embed statement:
<embed ...menu='false' loop='false'..>
  Reply With Quote
Old Nov 18, 2004, 05:40   #16
Si
Also available in Large
 
Si's Avatar
 
Join Date: Sep 2002
Location: Walsall, UK
Posts: 1,971
Don't forget that the <embed> tag is being deprecated in XHTML so you should always specify the <param> alternative in your <object> tag to ensure the Flash code is compliant in the future.
Si is offline   Reply With Quote
Old Jan 31, 2005, 11:05   #17
Steven McCullagh
SitePoint Community Guest
 
Posts: n/a
This won't get rid of the Settings and About menu items. To do this you can use the following JavaScript, which will disable right clicking on the whole page, including over the Flash movie.
<!--
<script language=JavaScript>
var message="Function disabled.";

function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("return false")

// function to handle right-click anywhere on page including Flash embed.

function handleclick() {
if (event.button==2)
{
// right button (2) was pressed
showAboutBox();
}
}

// function that shows our custom "about" box

function showAboutBox() {

msg = "Right Click Disabled\n\n";


if (event.srcElement.id == "MyFlashMovie") {

alert = "\n\nRight Click Disabled";

}

alert(popup_msg);

}

// set handler function for mouse presses

document.onmousedown=handleclick;

</script>

-->
REMEMBER TO INCLUDE id="MyFlashMovie" in your <object> tag! :)
  Reply With Quote
Old Jan 31, 2005, 11:08   #18
Steven McCullagh
SitePoint Community Guest
 
Posts: n/a
Also, if you need to disable the right-click menu in a Flash .exe file, use 'Resource Hacker' (freeware) to open the file. Select 'Menu', '604', '1036' and replace the popup "x" function with:
POPUP "x"
{
MENUITEM "&", 20037
}

This disables the right click menu of a Flash .exe file. I cannot guarantee how legal this is, regarding copyright protection etc, so please do this at your own risk (or don't do it at all). This merely explains how to, and doesn't encourage you to do it. :)
  Reply With Quote
Old Jan 31, 2005, 15:40   #19
D4G
SitePoint Member
 
Join Date: Jan 2005
Location: azusa
Posts: 16
Quote:
Originally Posted by Query
It Do work for Internet explorer, but i need it to be disabled in my .swf file, so that if i give .swf file to any one, it could not zoom in and out from it.
There is a way to do this in AS but it requires Flash Player 7 so understand not everyone will be able to this. I used this for work because kids kept playing with the computer and messing up the player. I did this along with a mouse hide and it worked great.

//this declares a variable as a menu item.
my_cm = new ContextMenu();

//this says to hide the buttons in the menu. Note: the only thing it doesnt hide is settings.
my_cm.hideBuiltInItems();

//This says to take the variable we created and make it the menu you want to use in the player.
_root.menu = my_cm;
D4G is offline   Reply With Quote
Old Feb 16, 2005, 12:57   #20
DAv
SitePoint Community Guest
 
Posts: n/a
dont function
  Reply With Quote
Old Jun 17, 2005, 14:54   #21
mike
SitePoint Community Guest
 
Posts: n/a
works well thanks
  Reply With Quote
Old Aug 13, 2005, 06:19   #22
HarryG
SitePoint Community Guest
 
Posts: n/a
None of these work!!!
  Reply With Quote
Old Aug 13, 2005, 21:23   #23
rhinovalley
SitePoint Enthusiast
 
rhinovalley's Avatar
 
Join Date: Jul 2005
Location: Minneapolis, Minnesota
Posts: 42
There is a REALLY simple way of doing this but it requires flash player 7, although it may work in flash player 6 as well. in the first frame of your movie, just add the following actionscript:
Code:
stage.showmenu = false;
simple huh?
rhinovalley is offline   Reply With Quote
Old Nov 9, 2005, 21:53   #24
Anonymous
SitePoint Community Guest
 
Posts: n/a
how can i disable right click menu when load the swf in my vb form.when i excute it menu is apperaring
  Reply With Quote
Old Dec 2, 2005, 12:58   #25
Josh
SitePoint Community Guest
 
Posts: n/a
here is a way..
<param name="menu" value="false">
  Reply With Quote
Reply

Bookmarks

« Previous Thread | Next Thread »

Thread Tools
Display Modes

 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Sponsored Links
 
Forum Jump


All times are GMT -7. The time now is 15:56.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright 1998-2009, SitePoint Pty Ltd. All Rights Reserved