Friday, October 23, 2009

Access Local File System with Flex SWF

Yes, you can access Local File System in Flex and that too with a standard SWF without resorting to Adobe Air.

Click the link below.

AccessTextFile.zip

You will find one SWF in a Zip. Download, Extract and Play the SWF from anywhere in your system. It's designed to read Text Files (including .htm files) that show up in a Text Editor. However, so far as the file access part is concerned, you can try virtually any file anywhere in your local system like the PDF or EXE - but the display will just be some nonsense dump.

All you need to do to access text files or any file for that matter is to key in the file name with full path and hit the button "Go".

It’s fitted with error handler. So it will not throw up the nasty dump in your flash player if you get the file path or file name wrong.

There's lot of buzz around sandbox security and Access to Local File System in Flex. So this is just a dig to check out what all an SWF can do.

Do let me know if you find any problem. Appreciate your comments if you find it of any interest to you.

2 comments: