# Why image continue loading after i have call loader.close()?

**URL:** https://forum.kirupa.com/t/why-image-continue-loading-after-i-have-call-loader-close/262336
**Category:** Uncategorized
**Created:** [June 5, 2008, 6:42am UTC](https://forum.kirupa.com/t/why-image-continue-loading-after-i-have-call-loader-close/262336 "2008-06-05T06:42:44Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hitdemo](https://avatars.discourse-cdn.com/v4/letter/h/a3d4f5/32.png) [@hitdemo](https://forum.kirupa.com/u/hitdemo)
#### Post date: [June 5, 2008, 6:42am UTC](https://forum.kirupa.com/t/why-image-continue-loading-after-i-have-call-loader-close/262336/1 "2008-06-05T06:42:44Z")

</div>

when i debuging my code via flash player’s view-\>emulate download ,i found that even i have call loader.close() method, the image is continue loading.

from flash 9 documentation, it said  
"  
close():void  
Cancels a load() method operation that is currently in progress for the Loader instance.  
"  
but it seems not work , from view-\>bandwidth setting, i can see image is still loading.

anyone know why? thx.

my code is or please down source code from attachment

```auto

import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.MouseEvent;
import flash.events.Event;
import flash.display.Bitmap;

var picLoader:Loader;

startload.selectable = false;
startload.mouseEnabled = true;
startload.addEventListener(MouseEvent.MOUSE_UP,startHandler);
function startHandler(event:MouseEvent):void
{
	picLoader = new Loader();
	picLoader.load(new URLRequest("test.jpg"));
	picLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,completeHandler);
}

stopload.selectable = false;
stopload.mouseEnabled = true;
stopload.addEventListener(MouseEvent.MOUSE_UP,stopHandler);
function stopHandler(event:MouseEvent):void
{
	picLoader.close();
	picLoader.unload();
}

function completeHandler(event:Event):void
{
	var bitmap:Bitmap = event.currentTarget.content;
	bitmap.width =20;
	bitmap.height =20;
	this.addChild(bitmap);
}

```

---

<div class="post-metadata">

### Author: ![johnlouis](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/johnlouis/32/568_2.png) [@johnlouis](https://forum.kirupa.com/u/johnlouis)
#### Post date: [June 5, 2008, 7:29am UTC](https://forum.kirupa.com/t/why-image-continue-loading-after-i-have-call-loader-close/262336/2 "2008-06-05T07:29:42Z")

</div>

i’m having quite the same problem. will be intereting to find out…

---

<div class="post-metadata">

### Author: ![Felixz](https://avatars.discourse-cdn.com/v4/letter/f/ecb155/32.png) [@Felixz](https://forum.kirupa.com/u/Felixz)
#### Post date: [June 6, 2008, 1:41pm UTC](https://forum.kirupa.com/t/why-image-continue-loading-after-i-have-call-loader-close/262336/3 "2008-06-06T13:41:05Z")

</div>

In simulate download it isn’t working  
Try to upload on server, You will see that everything is ok
