Is it possible to upload image into flash with flash only?
as an work assignment, I have to alter old flash app written with actionscript 2 to let users upload image in one movieclip.
Since i have no control over placement of that flash in server, is it possible to do this without any PHP code (yes, flash is on 开发者_运维知识库site on LAMP stack), with flash only? I.E. - user uploads image to flash application, which creates in itself temporary copy of image, that user 'copied' from his disk?
Thank you
It is possible in Flash Player 10.
http://www.mikechambers.com/blog/2008/08/20/reading-and-writing-local-files-in-flash-player-10/
But since you say you are to alter an old AS2 based Flash, it may not be realistic to use that feature, it would probably be more of an entire rewrite.
In short, No.
The upload
method of a flash.net.FileReference
object takes a parameter of the URL to post the file data to.
This would need to be a script that writes the file to disk or some other operation.
See http://livedocs.adobe.com/flash/9.0/main/00001679.html
Basically no, because Flash is a client-side scripting language, you would need the flash file to send the data to a server-scripting language page (like php), you can find some example at that address : http://www.flashkod.com/codes/UPLOAD-DOWNLOAD-SUPPRESSION-FICHIERS-FLASH-PHP-AVEC-CLASSE_36031.aspx
精彩评论