|
Author |
Topic: screenGrab() in a browser (Read 398 times) |
|
scrap-pile
|
screenGrab() in a browser
« on: Aug 3rd, 2003, 6:29pm » |
|
I did a quick search and didn't see any mention of this.. I've got an applet that saves screenGrabs when a key is pressed, and I have noticed that if I run the applet in IE (in Win ME) the applet locks up if I hit the key for a screenGrab. Now, I didn't expect the screenGrab to work, but I was hoping that it would just be ignored. It's not a huge problem, as I can just comment out that line when I export for web, but I wanted to mention it.
|
|
|
|
fry
|
Re: screenGrab() in a browser
« Reply #1 on: Aug 3rd, 2003, 7:08pm » |
|
hm, is it at least spewing errors to the java console? if so, that's something we can trap. if not this is gonna be more difficult (i.e. a different version of the classes for applet posting..)
|
|
|
|
scrap-pile
|
Re: screenGrab() in a browser
« Reply #2 on: Aug 4th, 2003, 3:54pm » |
|
Code: java.security.AccessControlException: access denied (java.io.FilePermission screen-0000.tif read) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkRead(Unknown Source) at java.io.File.exists(Unknown Source) at BApplet.screenGrab(BApplet.java:1047) at gravity_giger_00.loop(gravity_giger_00.java:58) at BApplet.nextFrame(BApplet.java:298) at BApplet.run(BApplet.java:256) at java.lang.Thread.run(Unknown Source) |
|
|
|
|
|
scrap-pile
|
Re: screenGrab() in a browser
« Reply #3 on: Aug 4th, 2003, 4:29pm » |
|
...and if it helps, this is the applet: http://www.scrap-pile.org/p5/gravity_giger_00/applet/ -space- resets it 's' and 'a' toggle anti-aliasing on/off and (the important one) 'q' takes a screenGrab.
|
|
|
|
fry
|
Re: screenGrab() in a browser
« Reply #4 on: Aug 4th, 2003, 5:20pm » |
|
thanks, that's real helpful. i won't be able to fix it for 57, since that's about to appear, but i have it on the list for 58 to try and put up a message when that happens, or for it just to fail silently without hanging the applet.
|
|
|
|
REAS
|
Re: screenGrab() in a browser
« Reply #5 on: Aug 6th, 2003, 7:49am » |
|
I made a clear note in the reference for screenGrab() saying it won't work within a browser. (Should be posted in a day or two.) Let me know if other details in the reference are not clear.
|
|
|
|
fry
|
Re: screenGrab() in a browser
« Reply #6 on: Sep 21st, 2003, 8:00pm » |
|
instead of the NullPointerException, this will just spew an error when running inside a browser in rev 60. also, you can use the new online() function to determine if you're in a browser, so that you know when you're allowed to call it.
|
|
|
|
|