Flex Assets/File Manager – ASP VBScript – Version 1.0
Posted on : 10-06-2009 | By : Michael Fitchett | In : ActionScript, Flex, JavaScript, VBScript
4

I recently built a JavaScript file manager but I wanted more control and better usability instead of expanding on the JavaScript version I decided to build it using Flex. Because Flex doesn’t have file system commands (that I know of) I had to use a server side language. We use VBScript at our company so I used that for the backend. I will be expanding this to other languages the next one to be released will be .NET C# as that seems to be what people polled for.
Screen Shots
How it works:
The Flex app makes an HTTPService GET request to an ASP VBScript file that sits on the server the script checks to see if any files exist in the directory specified if files do exist it outputs XML with nodes for each of the files along with some additional information such as file size, extension and so on. Once that data is returned to Flex it then parses and display it like any good file manager.
Download & Use it!
- You can download version 1.0 here Flex Assets Manager (141) you will need make sure that you extract it to the root of your website.
- Once you have extracted it, open up the “config.asp” file and change the strSystemPath to have the correct system path (based on your setup).
- Download http://www.vistaico.com/download/VistaICO-File-Icons.zip these File icons from Vista Icons and extract them to “/asset-manager/assets/”. I would have included them but I don’t want to get into any copyright issues.
- That’s it upload everything and run the “example.asp”
To Launch the Flex Asset Manager you can do the following:
<a href=”javascript:launchFlexAssetManager(’/asset-manager/uploads/‘,‘myForm.myFieldId‘)”>
- “/asset-manager/uploads/” would be the path to the directory that you want the Assets Manager to look in.
- “myForm.myFieldId” would be your form id and your form field id. This is used so after you select an item in the Assets Manager it will populate your form field with the file name.
If you look at the “example.asp” code you will see everything you need to use it within in a page.
Key & Mouse Commands
- [E] Enlarges Images
- [Delete] Deletes the File (a confirmation box will pop-up)
- [Double-Click] Selects the file (same as clicking the use but more common)
Well that’s it for now hope you like it. Shoot me any comments you have if you need help you can also post them.











Michael, if you are using this only on your local desktop you could use Adobe AIR for the backend. It has full read/write capabilities to the OS as well as File system commands and I have gone as far in the past as to use it create Win32 providers. Much easier to use then say JNI. All in all though great doc, I’ve actually been wondering about using VB for the server side code, and you answered it.
Hi Michael, great idea, works really well. will you kindly upload the flex source as I would need the url of the file and not just the file name. i’m sure this may be achieved by changing the xml but i will spend more time checking this out later on today. thanks again
Hi,
Great application… But I was wondering, if it’s possible to make it on php server side script?
Yes Matthew, you can use PHP or any server side code that you want to generate the look at inside of the folder and generate XML then read that into the Flex app. You will also need to create a page with an upload field for uploading Flex from what I know can’t do this alone so I used http://www.freeaspupload.net/