This content has been marked as final. Show 10 replies
File uploading and downloading can be done using the FileReference API. I do not know if you can use this to download to your server. I think you would need to download it to the users computer and then upload it to your server but I guess this defeats the object.
the hard part is saving the bitmap image to the server. check mario klingeman's bitmapexporter class at quasimondo.com
This is right flyer, i intend the same, but "which File name" i'd allow user to download. Once i'm able to know the file name generated by the bitmapData.merge(), i can allow users to save at their computer, rest is as simple as with the fileReference.uploade().
So the question is "What is the File Name"
The site quasimondo.com has a good ready built tool as an alternative for my project, but i'd prefer to write my own, if u or anybody else can just tell me the way to get the name of the file which has been generated by bitmapData.merge() class. If you visit http://www.sephiroth.it/tutorials/flashPHP/print_screen/ you would know what exactly i want, but problem with this site is that its using PHP as support. They have built their own class in flash which they have not thrown open to us.
Still their may be somthing in the site which i may not be able to see but u did. Please point me out
no file name is generated by the merge() method of the bitmapdata class. the bitmap to which you applied this method is the one that's been changed and the one you want to reference.
yes kglad, i do agree with you. But have to use fileReference library which will definitely require file name. The option with me is to allow user to download/ upload the whole SWF file. To be more precise, i am pasting some code of file reference here:
var fileRef:FileReference = new FileReference();
var url:String = " http://www.macromedia.com/platform/whitepapers/platform_overview.pdf";
now what should be the value of "platform_overview.pdf" in my case?
i guess i am able to explain you correctly
thanks & regards
You can't use FileReference because as kglad said there is no file.
The bitmapdata only exists in the flashplayer allocated memory. There is also no way to create a file locally from it.
The examples (I presume - I haven't looked at them) would send the bitmap's data to the server encoded via LoadVars. Once the data has been transferred to the server and php script has recreated the image from it then it can be downloaded. If you want to speciffy the filename of the image for download then you would just pass a filename variable along with your data for creating the bitmap and have php call the image it generates that same name.
"The option with me is to allow user to download/ upload the whole SWF file."
Does not make sense (to me anyway) in the context of what you want to achieve.
Your reply sounds logical GWD, but please check the site for me. I have downloaded the source from the site and tried to use in my file but with no output, neither error nor else.
It's unlikely I will be able to help you on that - its flash + php - others who are more familiar with it may be able to, though.
A suggestion though..if you're going to use an example like that make sure you've checked the forums on that site first. You may need to create an account to view the following pages but they contain relevant info.
This also seems relevant.
thanks GWD! u people r too good. As u said, the PHP file was generating the image again on the basis of pixel paramaters passed from flash. Great... although the bigger part of my wrok is done but i'd still prefer to do everything through flash only instead of PHP. Thanks again.