A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: no right code?

  1. #1
    Toronto's courtesan
    Join Date
    Apr 2002
    Location
    Toronto/NYC
    Posts
    82
    can anyone give me the code for a no right click option
    <param name= ???????>
    i believe it goes in the above code - i had the code but seemed to have lost it.

    thanks

  2. #2
    Senior Member
    Join Date
    Apr 2002
    Posts
    212
    If its JAVASCRIPT to prevent users from right clicking you are after try the following...

    <script language=JavaScript>
    function clickIE() {
    if (document.all) {
    return false;
    }
    }
    function clickNS(e) {
    if (document.layers||(document.getElementById&&!docum ent.all)) {
    if (e.which==2||e.which==3) {
    return false;
    }
    }
    }
    if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown=clickNS;
    }
    else{
    document.onmouseup=clickNS;
    document.oncontextmenu=clickIE;
    }
    document.oncontextmenu=new Function("return false")
    </script>

    This will also supress an alert to the user.

    Cheers...

  3. #3
    SWiSHer extraordinaire
    Join Date
    Dec 2000
    Location
    Australia
    Posts
    3,900
    Originally posted by ela4u
    can anyone give me the code for a no right click option
    <param name= ???????>
    i believe it goes in the above code - i had the code but seemed to have lost it.

    thanks
    generate the HTML from SWISH with the menu option turned of (in the Export Panel) and you'll have exactly what you want.

    That's better than hand-coding <object> and <param> tags yourself.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center