# addEventListener not detected

**URL:** <https://forum.kirupa.com/t/addeventlistener-not-detected/294549>\
**Category:** Uncategorized\
**Created:** [August 16, 2009, 11:03am UTC](https://forum.kirupa.com/t/addeventlistener-not-detected/294549 "2009-08-16T11:03:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pinkpantera](https://avatars.discourse-cdn.com/v4/letter/p/ac91a4/32.png) [@pinkpantera](https://forum.kirupa.com/u/pinkpantera)\
**Post date:** [August 16, 2009, 11:03am UTC](https://forum.kirupa.com/t/addeventlistener-not-detected/294549/1 "2009-08-16T11:03:20Z")

</div>

Hi,

I have a problem that is driving me nuts. Essentially I am loading a swf dynamically into a class. (SlideControlsMC) I can access the movieclips within the swf, and change things like alpha, x etc. But when I come to put an eventlistener on an MC, it simply isn’t detecting it.

I checked the depth of the SlideControlsMC and it is above everything else. I have imported the requred flash.import.events and when I compile, I get no errors.  
The following is the code I am using add the eventlistener.

```auto

_slider.buttonLeft.buttonMode = true;
_slider.buttonLeft.useHandCursor = true;
_slider.buttonLeft.addEventListener(MouseEvent.CLICK, functionName)

```

This is how I am bringing in the .swf

```auto
private function loadSlider():void {
			_sliderLoader = new Loader();
			_sliderLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,addSlider);
			_sliderLoader.load(new URLRequest("interface/slidecontrols.swf"));
			_sliderLoader.x = 0;
			_sliderLoader.y = 0;			
			//addChild(_sliderLoader);
		}

		public function addSlider(e:Event):void {
		 
			_slider = new SlideControlsMC;
			addChild(_slider);
			// position slider
			// hide all of the markers
			for (var i=0; i<=9; i++) {
				item_mc = MovieClip(_slider.getChildByName("s"+i));
				item_mc.visible=false;
				trace(_slider.getChildByName("s"+i));
			}
			showSliderElements();
		}

```

Can anyone shed light on why I am not getting any response what so ever?

Thanks for your help.
