0 Replies Latest reply on Jan 15, 2011 7:51 AM by Laboratory Grey

    FileStream vs. URLLoader/Loader

    Laboratory Grey

      For handling image and text based data loading from the local file system, I can't seem to find a straight answer on best practices:


      All of the text based file loading examples in the AIR documentation use FileStream. While this certainly works, I'm not sure of the advantage over URLLoader.


      For images, one more or less must load an image file using the Loader class. You could manually decode the image data to get it's Bitmap data, but that's on the developer as AS3 doesn't have that functionality exposed. As such I assume that's why Jeff Swartz advocates it's usage here.


      I understand FileStream is a powerful data loading class, when you're not loading unusual file types and don't need byte-level access to the data. On consideration of this issue, I'm not sure why the AIR documentation recommends it's usage for file loading?


      Any clarification on this issue would be appreciated!