Possible to import an image into AS3 without PHP?

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

fingers crossed

Answers


Yes, you can if you are targeting Flash Player 10. Use the FileReference.load() method. Once the file is loaded, you can access to the raw data as a ByteArray, using the data property. In flex you can pass that to an Image component. In plain Actionscript, you can use the Loader.loadBytes() method to the display the loaded image.


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


The flash developer at work, seems to believe that it is not possible. That said you don't have to use PHP, you could use any server side technology that allows uploading (ASP.NET, Python, etc)


Need Your Help

Using CSS rotation and displaying information one after another from left to right

html css rotation horizontal-scrolling

Okay this is quite a weird question, but im creating a timeline showcasing films and there release dates and i have a lot of films that i want to display as text vertically. I want each film to app...