Good point... but to make my point I have created a very simple sample.
1. Copy and paste the code below to a blank FLA and run it (NOTICE: You have
to provide a file to load and it can be a simple png)2. You should see a
trace statement "FILE LOADED"
3. Close the window
4. Nothing appears on the trace window
5. Open flashlog.txt on your system
6. You should see the very last line of text something similar to the
following:

THERE WAS AN ERROR
[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2
text="Error #2036: Load Never Completed. URL:
file:............./layout.png"]


//------------------------------START COPY AND PASTE CODE

var loader : Loader;
var request : URLRequest;

function load ( file : String) : void {
request = new URLRequest( file );
loader.load(request);
}

function init() : void {
loader = new Loader();
loader.contentLoaderInfo.addEventListener ( Event.COMPLETE, onComplete);
loader.contentLoaderInfo.addEventListener ( IOErrorEvent.IO_ERROR, onError);
}

function onComplete ( e:Event ) : void {
var target = e.target;
var icon = loader;
trace("FILE LOADED");
}

function onError ( e : IOErrorEvent ) : void {
trace("THERE WAS AN ERROR");
trace(e)
}

init();
load("layout.png");

//--------------------END OF CODE FOR FLASH

Interesting huh?

....helmut

On Wed, May 28, 2008 at 4:10 PM, Merrill, Jason <
[EMAIL PROTECTED]> wrote:

> Are you by any chance inadvertently calling a load again after the
> initial file gets loaded?  I wonder if the error is due to something
> else, not the load you think you're doing...
>
> Jason Merrill
> Bank of America
> Global Technology & Operations & Global Risk L&LD
> eTools & Multimedia
>
> Join the Bank of America Flash Platform Developer Community
>
> Are you a Bank of America associate interested in innovative learning
> ideas and technologies?
> Check out our internal  GT&O Innovative Learning Blog & subscribe.
>
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
...helmut
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to