5 Most Recent (5)
    Text Editor (1)
    File System (2)
    List Box (5)
    Color Palette (1)
    Combo Box (8)
    Custom (3)
    Scroll Bar (1)
    Radio (1)
    Tree (1)
    Bar Chart (2)
    Ticker (2)
    Pie Chart (1)
Publisher:  Flash-db.com
Implemented By:  Jeffrey Hill http://www.flash-db.com/components/
A custom listbox used to browse files and directories on your server.
Check out this components listing in the remoting library for additional details and usage examples: http://www.flash-db.com/remoting/?serviceID=13

/* This uses a custom component, download the source files at the bottom to get the component */ 

#include "NetServices.as" 
#include "NetDebug.as" 

myResult = new Object(); 

myResult.onResult = function(result){ 

    
dirBox.removeAll(); 
    for (
i=(result.fileSize.length-1);i>=0;i--) { 
         
        
fileName result.fileName[i]; 
        
fileSize result.fileSize[i]; 
        
fileDate result.fileDate[i]; 
        
fileType result.fileType[i]; 
         
        
// Configure Data Provider for Custom List Box 
        
var directoryData     = { fileName:fileName,fileSize:fileSize,fileDate:fileDate,fileType:fileType }; 
         
        
// Add Items to the custom list Box 
        
dirBox.addItem(fileNamedirectoryData); 
    } 
    
//dirBox.setChangeHandler("doSomethingWithSelectedFile"); 


myResult.onStatus = function(status){ 
    
trace("Error: " status.description); 


System.onStatus myResult.onStatus

// Create a connection to your gateway. 
var conn NetServices.createGatewayConnection("http:// pathTo /gateway.php"); 

// Specify the service you want to use.  There has to be a file called 'filebrowse.php' in your 
// services directory. 
var myService conn.getService("directoryBrowse"myResult); 

// Set up the base directory.  This is the directory where you start browsing from.  It is relative from the 
// flashservices directory. 
var directory "../../SomeDirectory/";   

var 
parentDir directory
var 
currentDir directory

// Call the service.  Load the initial directory map. 
myService.browseDirectory(directory); 

// Function used for browsing lower directory's. 
function browseChild(dir) { 

    
// dir is passed in from a button in the component. 
    
childDir currentDir+dir+"/"

    
// Call the service. 
    
myService.browseDirectory(childDir); 
     
    
parentDir directory
    
currentDir childDir


// used to browse parent directories. 
function browseParent() { 
    
currentDir parentDir
    
// Call the service. Pass in the parent directory. 
    
myService.browseDirectory(parentDir); 

Check out this components listing in the remoting library for additional details and usage examples: <a href="http://www.flash-db.com/remoting/?serviceID=13">http://www.flash-db.com/remoting/?serviceID=13</a>
   download component source files (zip)


Area Map: Home | About | Extend | Links | Commercial | Submit Component    
< / form > < !-- Google analitycs -->