> Hi,
> first off: cool ;).
> Question though, since flash idea of multithreading is that there are no
> real threads for us to create and each method runs synchronized (as in
> public synchronized as in java), what would be a case where i would wanna
> use asynchronous callbacks?

They are used here to support the following case:

You wrap a dynamic class. It takes time for that class to load, but
you want to call some methods on that class right away, before its
loaded. By registering callbacks, you can call a method on the class,
and be "calledback" when the data is ready. So, in this way, you don't
have to worry about waiting for the class to load, you just tell it to
do something, and it will tell you when it is done.

In the example code that i include in the post, you can see that i've
called the 'output' method of the wrapper instance, and its "running"
it before the class is loaded. Via callbacks, once the class is
loaded, i get the results of calling those methods.

> I know that the XML object does this, but i think this object since its
> natively implemented and stuff really does run in a separate thread.
>

Please note that i'm not talking about threads. Perhaps i should have
described it as 'queuing' your function calls.

Thanks for the reply!
j

--
Jos Yule
Digital Hyakugei
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to