PDA

View Full Version : browse and load in flex 3


WaZz
11-11-2008, 03:09 PM
I would to be able to browse for an image and load it. Is there a way of doing that in flex 3 ? Is there a workaround ?

I am trying to upload an image through AMFPHP, and all I can think of is browse for an image, load it, draw a BitmapData, generate a ByteArray and send that information to AMFPHP. Maybe there is a better way, any suggestion ?

ABM
11-12-2008, 07:34 PM
Hi WaZz,

Yes it is possible to browse with Flex3 a file, you have to user the FileReference class to achieve that check this link http://livedocs.adobe.com/flex/2/langref/flash/net/FileReference.html#includeExamplesSummary

Regards,
Adil

WaZz
11-13-2008, 03:02 AM
thanks for your help, but I was more looking for 'load preview' rather than an upload.

I know that in Flex4, you can load the file before uploading it. But it seems that it is not possible in Flex3....