Can I import an image to AS3 without PHP?

In actionscript 3, is it possible to allow the user to upload an image to a flash movie at runtime without POSTing to a PHP script? I don't want to export the image or save it anywhere, I just want to be able to display the image in a flash movie

fingers crossed

+1


source to share


3 answers


Yes, you can if you're targeting Flash Player 10. Use the FileReference.load () method. After the file is loaded, you can access the raw data as a ByteArray using the data property. In flex, you can pass this to the image component. In simple ActionScript, you can use the Loader.loadBytes () method to display the loaded image.



+2


source


This feature has just been added in Flash Player 10 / Flash CS4, so if you can use that, you can.



+2


source


A Flash developer at work seems to think this is impossible. That being said, you don't need to use PHP, you can use any server side technology that allows uploading (ASP.NET, Python, etc.)

0


source







All Articles