Hi all,

I am writing my application in ExtJS and PHP, and I need actionscript to build a folder browser just to get the folder path.

Unfortunately, I am unfamiliar with ActionScript.

However, upon searching on the web, I have found this little script:

import flash.filesystem.File;
import flash.events.Event;

var directory:File = File.documentsDirectory;

    directory.browseForDirectory("Select Directory");
    directory.addEventListener(Event.SELECT, directorySelected);
catch (error:Error)
    trace("Failed:", error.message);

function directorySelected(event:Event):void 
    directory = event.target as File;
    var files:Array = directory.getDirectoryListing();
    for(var i:uint = 0; i < files.length; i++)

Does anyone know how to integrate this with my ExtJS/Javascript and PHP?

I am open to other options as well.

Many thanks!!!

8 Years
Discussion Span
Last Post by MidiMagic

First of all, you have to carefully note one thing, this code would not work in flash with web application (which has the possibility to connect php/Javascript). This will work only in AIR application which will work as an application. So it would not help you to integerate php.

Infact, I will try to give possibility if any...

Votes + Comments


Yeah, I've tried with SWFUpload, and flash won't help either.
Will look at applets next.


No web page is allowed to browse the local folders of the client computer. This is a security violation. It is illegal in many countries.

The only function allowed to have partial access to the folders of the client computer is the ftp upload/download function, under the direction of the client user himself.

You can do browsing of the folders of the portion of the server the web page owner has control over.

Edited by MidiMagic: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.