Friday, August 19, 2005

Flash® 8 - flash.net.FileReferenceList to DataGrid

Flash® 8 supports a new intrinsic object called flash.net.FileReferenceList. In this example, I will select multiple files with FileReferenceList.browse and write the data to a DataGrid.



The flash.net.FileReferenceList has a property fileList that is an array. It is very easy to use this as a dataProvider. The key to this code is just assigning the DataGrid.dataProvider property to the FileReferenceList.fileList with some small changes for compatibility.

This example will ship with full source and documentation within Flash® by Example.

Have a great weekend, More to come on Monday!

Ted ;)

2 Comments:

At August 24, 2005 9:56 AM, Rob Stanley said...

Great, does this mean that we will be able to incorporate file uploads in Flash? Hopefully as at the moment I have to switch to html to do it.

 
At August 24, 2005 10:05 AM, Ted Patrick said...

Rob,

Yes that is it exactly. Flash Player 8 can select a file locally, and upload the file to any server. Likewise the player can also download content to the local machine and presents a "SaveAs" dialog to the user directly with no help from the Browser. Everything is integrated into the FileReferenceList and FileReference Classes and you use ActionScript to integrate this functionality into your application. I will post an example next week showing the file upload and download in more detail.

Regards,

Ted Patrick

 

Post a Comment

<< Home