Hi, Here's my class so I can reference the urlRequest object via the UrlLoader object via the complete event.currentTarget...
//----- package comps { import flash.net.URLLoader; import flash.net.URLRequest; public class URLRequestLoader extends URLLoader { public var urlRequest:URLRequest; public function URLRequestLoader(request:URLRequest=null) { //TODO: implement function this.urlRequest = request; super(request); } } } //----- Is this good, bad or ugly or just bloody stupid? There's a topic here about something similar: http://www.kirupa.com/forum/showthread.php?t=305004 and the approach there is to use arrays but why not just encapsulate the urlRequest object inside the extended URLLoader Class? I'm relatively new to OOP and Design so forgive me if this is bloody stupid :) I'm intrigued to what the experts think... Also, does this create an issue with garbage collection? Cheers, N 2009/12/11 Nick Middleweek <n...@middleweek.co.uk> > Hi, > > When we use URLLoader we pass it the URLRequest object either in the > constructor or via the load method... > > When the URLLoader is complete, the 'complete' function is invoked where we > can get access to the URLLoader object that has completed but I also want to > access the URL that was Requested... I would've thought there would be a > .request propery on the URLLoader but there isn't... > > Has anyone got any ideas on how I can achieve this? > > I was thinking about extending URLLoader and creating my own property and > then overriding the load function. > > What are peoples thoughts? > > > Thanks, > Nick > >