Note that there are some explanatory texts on larger screens.

plurals
  1. POProhibit Right Click Action On SWF files
    text
    copied!<p>I have a swf file and a html page which shows the swf file. I want to prohibit right click on swf file. I do not mean removing right click menu, I just want to prohibit the right click action. Then if you right click nothing will be happened.</p> <p>Here is the html code:</p> <pre><code>&lt;html&gt; &lt;head&gt;&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { $('#swf-holder').bind("contextmenu", function(e) { return false; }); }); &lt;/script&gt; &lt;title&gt;Help Me&lt;/title&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt; &lt;style type="text/css"&gt;html {overflow: hidden;}&lt;/style&gt; &lt;style type="text/css"&gt;body { background-color: #07090e }#swf-holder { margin-top: 0px; width: 715px; position: center; top: 0px; left: 0%; margin-left: 0px; }&lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="swf-holder"&gt;&lt;object id="content" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="715" height="580"&gt;&lt;param name="movie" value="Main.swf" /&gt;&lt;param name=quality value=best /&gt;&lt;param name=bgcolor value=#07090e /&gt;&lt;param name=allowScriptAccess value=always /&gt;&lt;param name="wmode" value="opaque" /&gt;&lt;object id="gecko" type="application/x-shockwave-flash" data="Main.swf" width="715" height="580" bgcolor=#4A4A4A wmode="opaque" quality="best"&gt;&lt;a href="http://www.adobe.com/go/getflashplayer"&gt;&lt;img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" border="0" alt="Get Adobe Flash player" /&gt;&lt;/a&gt;&lt;/object&gt;&lt;/object&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Any trick or idea for doing this?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload