This is a good approach. The reverse approach would be to wrap your URLLoader in a class and store the information there if you want the requesting class to be informed that the download has completed and which URL has been loaded successfully.
Would you get something like it
customLoader.url="http://.....";
customLoader.onLoadDelegate = this;
customLoader.load();
public function customLoaderComplete(url:String, data:[Object or whatever you set]) {
}
customLoader URL-
private var url:String;
private var onLoadDelegate:Object;
public function set url(_url:String):void {
url = _url;
}
public function set onLoadDelegate(_onLoadDelegate:Object):void {
onLoadDelegate = _onLoadDelegate;
}
, URLLoader .. Event.COMPLETE ,
public function dataLoaded(event:Event):void {
.. parse event.target.data if needed...
onLoadDelegate.customLoaderComplete(url, data);
}
, " " / , .