|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Articles
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'
|
|
|
|
|
|
#2 |
|
SitePoint Community Guest
Posts: n/a
|
I did what you said and It doesnt work for some reason, can anyone tell me why
|
|
|
|
#3 |
|
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? |
|
|
|
|
|
#4 |
|
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> |
|
|
|
|
|
#5 |
|
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! |
|
|
|
#6 |
|
SitePoint Member
Join Date: Jul 2003
Location: pakistan
Posts: 2
|
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! |
|
|
|
|
|
#7 |
|
SitePoint Member
Join Date: Jul 2003
Location: pakistan
Posts: 2
|
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! |
|
|
|
|
|
#8 |
|
SitePoint Community Guest
Posts: n/a
|
include
<param name="menu" value="false"> |
|
|
|
#9 |
|
SitePoint Community Guest
Posts: n/a
|
this doesnt help protect text from copy and paste
|
|
|
|
#10 |
|
SitePoint Community Guest
Posts: n/a
|
>> this doesnt help protect text from copy and paste
It's not supposed to. |
|
|
|
#11 |
|
SitePoint Community Guest
Posts: n/a
|
This works in IE, but not in Mozilla Firefox.
|
|
|
|
#12 |
|
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> |
|
|
|
#13 |
|
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.
|
|
|
|
#14 |
|
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 :) |
|
|
|
#15 |
|
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'..> |
|
|
|
#16 |
|
Also available in Large
![]() ![]() ![]() ![]() ![]() ![]() 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.
|
|
|
|
|
|
#17 |
|
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! :) |
|
|
|
#18 |
|
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. :) |
|
|
|
#19 | |
|
SitePoint Member
Join Date: Jan 2005
Location: azusa
Posts: 16
|
Quote:
//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; |
|
|
|
|
|
|
#20 |
|
SitePoint Community Guest
Posts: n/a
|
dont function
|
|
|
|
#21 |
|
SitePoint Community Guest
Posts: n/a
|
works well thanks
|
|
|
|
#22 |
|
SitePoint Community Guest
Posts: n/a
|
None of these work!!!
|
|
|
|
#23 |
|
SitePoint Enthusiast
![]() 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; |
|
|
|
|
|
#24 |
|
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
|
|
|
|
#25 |
|
SitePoint Community Guest
Posts: n/a
|
here is a way..
<param name="menu" value="false"> |
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 15:56.









Linear Mode
