Help with Loader.close()

Please help! I’ve been racking my brain and I can’t figure out how exactly to close a loader. I’ve tried several methods, and it seems that the following code should work (just an example for calling the close()). Thanks in advance for your help!


var loader:Loader = new Loader();
loader.load(new URLRequest(“image.jpg”));
stage.addChild(loader);

stage.addEventListener(MouseEvent.CLICK, clicked);

function clicked (event:MouseEvent) :void {
try {loader.close();}catch(error:Error) {}
}