# Problem with removeEventListener

**URL:** <https://forum.kirupa.com/t/problem-with-removeeventlistener/291946>\
**Category:** Uncategorized\
**Created:** [July 8, 2009, 4:00am UTC](https://forum.kirupa.com/t/problem-with-removeeventlistener/291946 "2009-07-08T04:00:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![doforumdo](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@doforumdo](https://forum.kirupa.com/u/doforumdo)\
**Post date:** [July 8, 2009, 4:00am UTC](https://forum.kirupa.com/t/problem-with-removeeventlistener/291946/1 "2009-07-08T04:00:56Z")

</div>

here what i wanted to say

i have created sq\_thumb movie clip. then i linkage sq\_thumb with class name “thumb”. then i double click sq\_thumb in the library to go to inside sq\_thumb timeline. then i write following code

```auto
var thumbURL:String = "thumb/" + basename + id + ".jpg";

var imageLdr:Loader = new Loader();
var imageURLReq:URLRequest = new URLRequest(thumbURL);
imageLdr.load(imageURLReq);
imageLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);

function imageLoaded(event:Event):void
{
	loadTarget.addChild(imageLdr.content);
}

```

then i go to main timeline. and create two buttons. one button is HOME and second button is PROFILE. so when i first run the program it first run the HOME button in which the above code is executed. then when i click the PROFILE button it should remove above code and display the content of PROFILE. code for PROFILE button on the main timeline is below

```auto
function bProfile(event:Event):void
{
	var contentRequest:URLRequest = new URLRequest("profileButton.txt");
	contentLoader.load(contentRequest);
}
profileButton.addEventListener(MouseEvent.CLICK, bProfile);

```

also see the attached file.

please help me i really need help
