|
Progressive Loading Images Demo
Progressive Loading Images SOURCE CODE
The flash.net.URLStream class is unique because it gives you access to the bytes of whatever you are loading as data arrives. Provided your server buffers data rapidly to the client, you will see the data stream loaded into the client progressively. I simply took this stream of bytes and routed it into a Loader instance so you could see the image loading. I think it is pretty cool that you can do that with ActionScript 3 and work at this low level to begin with.
When I get a chance I will be using this to create a new Image subclass for progressive loading. What I find interesting is that the browser cannot do this with images! In all 4 of the examples the image data streams independently of whether the format is GIF, JPG, PNG, or transparent PNG. Long story short these images display faster than they can in browsers today by leveraging Flash Player 9.