Loading...
Logo
Processing Forum
Hi,

I'm using saveFrame to save a frame from my applet. It works perfectly locally. When I sign my applet and post it to the web, nothing happens. Is it sving to a temp folder???

Is there a way to open a "save to" dialog on the user's computer?

http://marzinp.free.fr/applets/Worms05

Thanks for your help...

Replies(3)

Sorry autoSolved()^^

I used

if(theEvent.isFrom(saveButton)){
    if(savePath==""){savePath=selectFolder("Choose a folder to save this applet captures:");}
    saveFrame(savePath+"\\worms-####.jpg");
  }

savePath is initiated in Setup(): String savePath="". The user chooses where he wants the captures to be stored. Problem: what if he/she wants to change this location???
saveFrame(savePath+"\\worms-####.jpg");
You better make it saveFrame(savePath+"/worms-####.jpg");
Forward slashes works even on Windows machines (and are nicer, no need to double them) and ensure it will work on Unix computers.
Done! Thanks PhiLho for the tip!