A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: disable right click

  1. #1

    Wink

    anyone know the html code for disabling the right click on a movie?

  2. #2
    An Inconvenient Serving Size hurricaneone's Avatar
    Join Date
    Mar 2001
    Location
    You know where
    Posts
    1,918
    Try this

    <SCRIPT LANGUAGE='javascript'>
    //<!--
    function rightclick(e){
    if(document.all){
    if(event.button==2 || event.button==3){
    alert('Sorry, all the images on this page are copyrighted.');
    return false;
    }
    }
    if(document.layers){
    if(e.which == 3){
    alert('Sorry, all the images on this page are the copyrighted.');
    return false;
    }
    }
    }
    if(document.layers){
    document.captureEvents(Event.MOUSEDOWN);
    }
    document.onmousedown=rightclick;
    //-->

    </SCRIPT>

    Cheers

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