How do I load multiple FLV files, with the same COMPLETE event handler?

Posted by Josamoto on Stack Overflow See other posts from Stack Overflow or by Josamoto
Published on 2010-04-15T07:34:36Z Indexed on 2010/04/15 10:33 UTC
Read the original article Hit count: 230

Filed under:

When loading files with the Loader in ActionScript 3, I am able to inspect the event attribute on the complete event handler to determine what the URL is for the file that has completed downloading.

Loader exposes a variable in the event handler attribute: event.target.url which I means that when the handler returns, I can easily determine which file is loading.

However, my client has sent numerous FLV files built in After Effects that constitute the UI elements of a Flash application built for them. Loading FLV files require the use of URLLoader, and this does not appear to expose the name of the file being loaded.

So I either need to convert the FLV's to SWF, so I can load them as normal.

Is there a way to determine the URL inside the onComplete event handler fired by URLLoader?

© Stack Overflow or respective owner

Related posts about actionscript-3