# Help with Loader.close()

**URL:** https://forum.kirupa.com/t/help-with-loader-close/267249
**Category:** flash
**Created:** [July 30, 2008, 3:43am UTC](https://forum.kirupa.com/t/help-with-loader-close/267249 "2008-07-30T03:43:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![valkner](https://avatars.discourse-cdn.com/v4/letter/v/b2d939/32.png) [@valkner](https://forum.kirupa.com/u/valkner)
#### Post date: [July 30, 2008, 3:43am UTC](https://forum.kirupa.com/t/help-with-loader-close/267249/1 "2008-07-30T03:43:48Z")

</div>

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) {}  
}
