Also, remember that you don't actually add the listeners directly to the loader, but instead add them to loader.contentLoaderInfo. See the example on the livedocs: http://livedocs.adobe.com/flex/201/langref/flash/display/Loader.html.
- Dan Freiman On Jan 16, 2008 8:58 AM, Jim Hayes <[EMAIL PROTECTED]> wrote: > Does Loader not throw an error event rather an immediate error? > > Try adding a listener for the IOerror (and security error, just to be > safe) events instead. > > > > -----Original Message----- > *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On > Behalf Of *Ben Marchbanks > *Sent:* 16 January 2008 13:57 > *To:* flexcoders@yahoogroups.com > *Subject:* [flexcoders] Trouble with try/catch for loader error > > > > I am using Ely' SuperImage with the preload to cache feature. > > I am having some through with loading one set of images to the cache > and not having much luck trapping the error. > > The following try/catch is totally ignored - what am I doing wrong ? > > here's a snippet > ---------------------------------------------------------- > > trace(" not in cache or inaccessible: creating new Loader"); > loader = new Loader(); > > try{ > loader.load(request); > } > catch(e:Error) > { > trace("loadResult="+e) > } > cachedItems.push(loader); > result = loader > ---------------------------------------------------------- > > > ______________________________________________________________________ > This communication is from Primal Pictures Ltd., a company registered in > England and Wales with registration No. 02622298 and registered office: 4th > Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. > VAT registration No. 648874577. > > This e-mail is confidential and may be privileged. It may be read, copied > and used only by the intended recipient. If you have received it in error, > please contact the sender immediately by return e-mail or by telephoning > +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its > contents to any person. > This email has been scanned for Primal Pictures by the MessageLabs Email > Security System. > ______________________________________________________________________ > >