Flexcomps’s Weblog

AS3 URLStream – A powerful utility

Posted on: May 26, 2008

This is one of the most awaited feature in Flash player (The low level access for downloading of data). The magnificent feature provides clients the access of data as soon as the downloading starts. With the help of this class now there is a lot of scope when you are dealing with external files and data. Some of the feature i have thought those are very much achievable (some were achievable in previous version of flash as well) in a better manner

1. Getting the type of files before it is fully downloaded ( Client application can read the header of the file and can determine the file type). I am working on one example for the same and will come up soon

2. Getting the image dimensions before it gets loaded

3. Making a file transfer utility with a socket server side (Server side)

4. Remote desktop or display sharing applications

5. IRC chat applications

6. Loading animated GIF at runtime

These are some of the features i had think of at this moment. I would like your opinions on more features we can look forward with using this powerful class.

Locations of visitors to this page

5 Responses to "AS3 URLStream – A powerful utility"

Hi YPuri,

AS3 is really providing bunch of nice features. And thanks for sharing all these stuff with us.

I have one query, related to Loader Class. Can we load multiple resources from outside into flash using single object of Loader class.

Sorry for diverting the topic of main thread.

Hope u will nt mind calling YPuri here 🙂

Hi Vaibhav

The loader class is a subclass of DisplayObjectContainer and inherits all the methods of it’s parent classes which sometime gives a feel that you can add more child to it however the adobe have given following explanation to it.

The Loader class overrides the following methods that it inherits, because a Loader object can only have one child display object—the display object that it loads. Calling the following methods throws an exception: addChild(), addChildAt(), removeChild(), removeChildAt(), and setChildIndex(). To remove a loaded display object, you must remove the Loader object from its parent DisplayObjectContainer child array.

Hope this explains everything.

You can not load multiple objects with a single loader class. To load multiple, you should have multiple loaders.
You can create loader instance into provided target sprite and keep the reference for future use to dispose things.
i.e.
target.ldrLoader = new Loader();
arr.push(target.ldrLoader);

But at any cost you can load only one thing with a single loader instance.

is there any way to load exe,avi and other type of files?

is there any way to load exe, avi and other files?

Leave a comment

May 2008
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  

Blog Stats

  • 326,383 hits