-
What did you exactly do, since it works for me. I just tested it again. You can also replace the image on the server in the script
http://flashscript.biz/flashas3/save.../testimage.jpg
with an image url for an image on your desktop, then press save button and then check the image. If you get that message, which you got, then the file was not written.
-
My script which i pasted on the previous page also comes with so many (hundreds) actionscripts. Therefore i wouldnt really wanna mess with only one of them. I made the php file the way your adress showwed (except naming it save.php) and i got that error file.
If somebody just take a look at my code for 2 minutes and tell me what is wrong exactly, im sure we can solve this problem very quick.
-
1. Did you test this on a server?
2. The URLRequestHeader arguments are important.
var header:URLRequestHeader = new URLRequestHeader("Content-type","application/octet-stream");
3. You need to use an image encoder, preferably the one from Adobe, which works well.
I recommend you to make your script much simpler. The php file works very well with the SaveByteArray class, which I recommend to use instead. The document class, which you saw above the php script is an example how to call and use the SaveByteArray class.
-
Well my friend. I am not good with flash coding. I am making changes on the actionscript. I cant write nor create one. I am just editing. So since im not good with flash script can you tell me where am i gonna add codes exactly?
I have tested the php file on my server yes. But like i said i didint make any changes on the actionscript.
-
I can only give you limited help. So in your script, which you showed above change this line:
loc3 = new flash.net.URLRequestHeader("Content-type", "application/x-www-form-urlencoded");
to
loc3 = new flash.net.URLRequestHeader("Content-type","application/octet-stream");
Then instead of
flash.net.navigateToURL(loc4, "_self");
replace with:
var loader:URLLoader = new URLLoader ;
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.load (loc4);
Try that and see what you get. Don't forget to import any new classes.
-
I used the php file you told me in the link you sent...
Same result
myResult=Could not place the file
-
Did you make all the changes in the script as I pointed out above? I thought you were already using the php script, which I linked to.
-
I did. Then i recompiled the swf and got this error.
-
Another possibility is that your url is not correct:
p.rooturl + "/save.php?name=" + arg2 + "&type=" + arg1
The name has to be the name of the image plus the extension (for example image.jpg). What is type? That is not recognized by the php script as a variable. The only other variable recognized is "folder" to create a folder.
-
I dont determine the name. I choose the file from the computer and edit it. So file name changes everytime i edit a picture.
I can edit any picture file. So the type changes also.
The save.php file is in he same folder with index.html and swf file. There are no other files anyway.