Loader.close() method won't stop a progress

Hello,
I’m running into some problems using the close() method.
I’m trying to build a class that checks a resource size before loading it.

it’s very simple: I use the Loader class to load the resource, listens to the first progress event and immediately closes the connection with the Loader.close() method.

However, the close() doesn’t seem to stop the Loader after the first progress event dispatched.
here is a quick copy & paste frame code just to demonstrate my point:
Code:


import flash.display.Loader;
import flash.events.ProgressEvent;
import flash.net.URLRequest;

var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, printProgress);
loader.load(new URLRequest("big.jpg"));

function printProgress(evtProgress:ProgressEvent):void
{
	trace("progress");
	loader.close();
	trace(evtProgress.bytesLoaded);
}

The ProgressEvent is thrown until the big.jpg loading is complete.
How could I stop it just after the first progress event ?

Thanks a lot,

Me.