Hi all I'm just relaying this message from http://www.bytearray.org This issue realy needs to bee pointed out for adobe so we can create the best RIA.
Here is the article with minor modification. FileReference - A petition for Astro ! [ by Thibault Imbert ] André Michelle posted a few days ago a petition concerning the onSoundComplete event. This gave me an idea concerning the flash.net.FileReference API we have currently in the Flash Player 9. One of the most disappointing thing we have when playing with bytes in the Flash Player 9 is the FileReference API. Let's say you call the FileReference.browse() method to select a file. Once selected, you have no way to get a ByteArray from it directly. Of course you have the following solution : First, you have to upload the file to your server, then you have to download it with the flash.net.URLLoader class as a binary file (URLLoaderDataFormat.BINARY), and then you'll get the bytes. This means that for any Flash online image editing application, you will have to upload your bitmap first, and then download it before having fun with the application. Now, even worse. There is no way to save a generated ByteArray on the hard disk through the FileReference API. Once again, you will have to upload it, and then ask to a server side script to spit it out back to the browser with appropriate headers so that it shows a download box window. But guess who does allow all of this ? Here is how you would get the bytes from a selected file in Silverlight 1.1 with the OpenFileDialog class : <Silverlight code> Stream fileStream = browseDialog.SelectedFile.OpenRead(); byte[] funkyBytes = new byte[fileStream .Length]; fileStream.Read (funkyBytes, 0, (int)fileStream.Length); <Silverlight code/> The final release of Silverlight 1.1 will also include a SaveFileDialog class. This should allow us to save runtime streams locally through a save-as dialog window. As would say André, please leave a comment. Let's bring that in the Flash Player 10, that would rock. Please Adobe read more on: http://www.bytearray.org/?p=119 http://blog.andre- michelle.com/2007/198/ --Cato Paus 03:51, 2 Jan 2008 (PST) Retrieved from "http://labs.adobe.com/wiki/index.php/Talk:Astro"