Thread: Newbie
View Single Post
  #5 (permalink)  
Old 09-08-2004, 08:53 PM
monstruo_ monstruo_ is offline
Junior Member
 
Join Date: Sep 2004
Posts: 7
Default Re:Newbie

???

Ok,
I added the code to the swf movie,
Also i added in the initialize script this
Code:
//Initialize

var tmp_image = Shell.getSpecialFolder("temp") + "\\~" + (new Date()).getTime().toString() + ".jpg";

getMainWnd().onClose = function ()
{
if (File.exists(tmp_image))
(new File(tmp_image)).remove();
}


return true;
And on the saveimage script i added this,
Code:
//saveimage

//Get image name
var image_name = FlashPlayer.getVariable("_root.image_name");
trace(image_name);

//Open the filesave dialog
var saveFilter = "Jpeg files(*.jpg)|*.jpg|";
var image_to_save = Dialogs.fileSave(saveFilter, ".jpg");
if (image_to_save && image_name != '')
{
trace(image_to_save);

var img = Image.load(image_name);
img.save(image_to_save);
Shell.open(image_to_save);
}
When I click Build test application i get this output error that my files do not exists. I run the program and it works fine, I can draw on it and when i click save the save dialog box appers but when i save it, it doesnt do anything, it doesn created anywhere....

Again be patient with me, I am not a programmer or a coder, and I do apologize if my question seem silly or dumb. But i really need this to work.
Reply With Quote