Web Design Forum: System Clipboard script won't work - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

System Clipboard script won't work Rate Topic: -----

#1 User is offline   webbhost 

  • Dedicated Member
  • PipPip
  • Group: Members
  • Posts: 192
  • Joined: 12-May 08
  • Reputation: 0
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 09 March 2011 - 06:12 PM

Hi all,

I'm designing a system that requires access to the end users system clipboard... namely to prevent the use of Print Screen by sending " " (space) to the clipboard once a second...

This is working fine when I run the test in flash.... however when I transfer it to the browser, and try and run it from there... for 1 it does not connect to system.Clipboard() and 2, the loop is not working (I put a coloured box on the timeline to ensure that the script is looping for now).

Can someone please take a look and tell me what I'm doing wrong please? I'm totally new to flash / AS3 as my area of expertese is PHP / Mysql..

Thanks to anyone that can help..

The broken test page:

C:\Documents and Settings\Nathan Webb\Desktop\flashtest\nocopy.html

Source:

C:\Documents and Settings\Nathan Webb\Desktop\flashtest\nocopy.fla


If anyone has a better way of doing it than I have tried, then please go ahead and tell me.. I did also try this below but got a error message...

:Actionscript in frame 1

The Code:

function ClearClipBoard(){
System.setClipboard("");
setTimeout(ClearClipBoard(), 1000);
}
setTimeout(ClearClipBoard(), 1000);



Output:

Error: Error #1023: Stack overflow occurred.
at Untitled_fla::MainTimeline/ClearClipBoar…
at Untitled_fla::MainTimeline/ClearClipBoar…
at Untitled_fla::MainTimeline/ClearClipBoar…
at Untitled_fla::MainTimeline/ClearClipBoar…
at Untitled_fla::MainTimeline/ClearClipBoar…




P.S. if anyone is concerned that I should not be connecting to a users clipboard, they will be informed that the system will be doing this before the flash document is loaded into the webpage.

This post has been edited by webbhost: 09 March 2011 - 06:13 PM

0

#2 User is offline   henbast 

  • Dedicated Member
  • PipPip
  • Group: Members
  • Posts: 215
  • Joined: 22-February 11
  • Reputation: 41
  • Gender:Male
  • Experience:Nothing
  • Area of Expertise:Designer/Coder

Posted 09 March 2011 - 06:22 PM

What if I have important stuff in my clipboard that you wipe out by trying to prevent me copying images (which is still trivial)? That's gonna annoy everyone.
0

#3 User is offline   webbhost 

  • Dedicated Member
  • PipPip
  • Group: Members
  • Posts: 192
  • Joined: 12-May 08
  • Reputation: 0
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 09 March 2011 - 06:24 PM

View Posthenbast, on 09 March 2011 - 06:22 PM, said:

What if I have important stuff in my clipboard that you wipe out by trying to prevent me copying images (which is still trivial)? That's gonna annoy everyone.



Thats why I will be notifying the user that the browser will be accessing the clipboard. If they don't agree with it, then they can see a non-enhanced version of the page.
0

#4 User is offline   webbhost 

  • Dedicated Member
  • PipPip
  • Group: Members
  • Posts: 192
  • Joined: 12-May 08
  • Reputation: 0
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 11 March 2011 - 01:20 AM

no matter, think I've found the answer.... not possible any more

http://cfruss.blogsp...tton-cross.html

However, doesn't really explain to me why zero clipboard works?? Shame :-\
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users