SWFLoader::load() is an asynchronous call, so you're never going to be able to
catch the error in a try block. You should be listening for error events on it
instead.
>
> From: "Michelle Grigg" <[EMAIL PROTECTED]>
> Date: 2007/04/13 Fri AM 09:05:56 CDT
> To: [EMAIL PROTECTED]
> Subject: [flexcoders] RangeError on SWFLoader
>
> Greetings,
>
> I have been haunted by these fricken #2006 RangeErrors since the start
> of my project though I've been able to fix all but one.
>
> I have a SWFLoader throwing a RangeError, and I can't seem to catch
> the damn thing. The irritating thing is that it's also a very
> intermittent bug so I have no way of telling for sure it will occur
> when first loading my app.
>
> This is the try/catch:
>
> try
> {
> myLoader.load( loadSwfEvent.swfName );
> }
> catch( e : Error )
> {
> trace( e.errorID + " " + e.name + " " + e.message );
> trace( e, ObjectUtil.toString( event ));
> }
>
> It doesn't actually call the catch - it simply prints out the error on
> the console leading me to believe that the error is actually being
> thrown somewhere else, even though the stack trace goes all the way
> back to the SWFLoader class.
>
> I initially thought it to be a timing thing - maybe the swfname wasn't
> being set properly or something, but investigating solutions along
> those lines have been fruitless.
>
> I'm now thinking I should probably be moving the try/catch somewhere
> else, but I would have no idea where.
>
> Any ideas? Similar problems?
>
> Cheers,
> Michelle
>
>
>
>
--
John Mark Hawley
The Nilbog Group
773.968.4980 (cell)
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/