9 Replies Latest reply on Jul 25, 2007 7:41 PM by ttdevelop

    How to disable PrintScreen Key?

    ttdevelop Level 1
      Is it possible to disable the function of PrintScreen key in Flash?
      I saw similar block function in Windows Media Player. When you play a copyrighted material, you can't take screenshot of the video unless you use some3rd-party players such as StormPlayer (a player from China) to take screenshot of videos.
      I wonder if there are similar functions in Flash or Flash player to allow users to disable PrintScreen key so that it is not easy for people to take screenshots out of a flash movie.

      One friend of mine mentioned to apply some action to the PrintScreen key so that when it is pressed, the paste board will be swapped with a white image rather than the screenshot.

      I don't know how we can apply action to PrintScreen key in flash. Anyone has any ideas?
        • 1. Re: How to disable PrintScreen Key?
          Greg Dove Level 4

          System.setClipboard will set the clipboard to something you want eg
          System.setClipboard("BAD LUCK");
          I think you could just do this via setInterval every 100 millisecs.

          Personally I think its a waste of time (not to be interpreted in a harsh way). Basically because if someone is determined they can do it.
          • 2. Re: How to disable PrintScreen Key?
            ttdevelop Level 1
            Thank you for telling me about the solution, I've been searching for that desperately.

            Well, I know this anti-ripping idea is probably going to be a waste of time, but hoping that it is not all wasted. I mean, since no firewall or any protection solutions are 100% secure, I never expected to be able disable something completely. But if we can spend less time to make ripping more inconvenient to the rippers, then we got a good idea.

            There is no way to block any determined thief to break into your house, but if so many people come into your house without an invitation, then maybe you'd want to make an alarm or some traffic management system, right?

            Again, thank you for replying to my message so quickly.
            • 3. Re: How to disable PrintScreen Key?
              Greg Dove Level 4
              You're welcome. I understand your point. I just think that those people that are that are determined will find a way. And be aware you may annoy some people with this approach - e.g. if they are trying to paste a password in another browser window or trying to paste legitimate registration code into a newly installed application - I can imagine all sorts of issues with the help desk at the software company. ;)
              As I type here I've got it running via onEnterFrame in another web page and all I can paste is BAD LUCK lol.

              • 4. Re: How to disable PrintScreen Key?
                ttdevelop Level 1
                "As I type here I've got it running via onEnterFrame in another web page and all I can paste is BAD LUCK lol."
                I don't know what your last sentence mean.

                But I considered the inconveniences too, well, so I'll try to make sure this will not hurt regular users. Hopefully only the rippers will complain.

                I believe the determined rippers will be the minority of all rippers, and so as long as they don't find some very convenient way to rip, it will be alright. And of course things will be smooth as long as long we don't ignite all of the people by saying "THIS ANIMATION IS IMPOSSIBLE TO RIP!!!"
                • 5. Re: How to disable PrintScreen Key?
                  ttdevelop Level 1
                  If you have a messenger or something, I would like to know.

                  My msn messenger is ttdevelop@hotmail.com
                  • 6. Re: How to disable PrintScreen Key?
                    Rothrock Level 5
                    His last sentence means that if that swf is running then it messing up copy and paste for EVERYTHING else that uses the system clipboard. Other web pages, possibly even other programs – although some browsers slow down the rate that flash plays when the page loses focus so I'm not exactly sure how that will play out.
                    • 7. Re: How to disable PrintScreen Key?
                      ttdevelop Level 1
                      I tried the code, it worked as intended.
                      But now I know what your last sentence means....
                      • 8. Re: How to disable PrintScreen Key?
                        ttdevelop Level 1
                        If we call setClipboard every 100 ms, PrintScreen is definitely shut. Since the clipboard will be filled and refilled with texts instead of images.

                        However, it has the same problem like any programs with an infinite loop. It never stops and we can't control when it stops until we close the program.

                        Is there any way we can know if the user is ON the page with flash on? Maybe we can turn off the function once the user is no longer on the IE window?
                        • 9. Re: How to disable PrintScreen Key?
                          ttdevelop Level 1
                          this.onEnterFrame = function (){
                          if (Key.isDown(44)) {
                          trace("Dont try to capture me!");
                          System.setClipboard("Dont try to capture me!");
                          }
                          }

                          This is a code I found online, the author claims that this would disable PrintScreen key. But I pasted the code in a new Flash document in CS3, compiled it, but it didn't work. And it shows a compiler error: 1120: Access of undefined property Key. For the line: if (Key.isDown(44)){
                          I am confused why it won't work while others claim that 44 is the keycode for PrintScreen