# I addEventListener but nothing happens?

**URL:** <https://forum.kirupa.com/t/i-addeventlistener-but-nothing-happens/269265>\
**Category:** Uncategorized\
**Created:** [August 25, 2008, 1:17pm UTC](https://forum.kirupa.com/t/i-addeventlistener-but-nothing-happens/269265 "2008-08-25T13:17:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pier25](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pier25](https://forum.kirupa.com/u/Pier25)\
**Post date:** [August 25, 2008, 1:17pm UTC](https://forum.kirupa.com/t/i-addeventlistener-but-nothing-happens/269265/1 "2008-08-25T13:17:55Z")

</div>

So I have this news\_module class in the library. Basically a dynamic list of buttons with data coming from the xml.

So I do everything as usual, but the EventListeners on the buttons don’t respond. No compiler errors at all… maybe a garbage collector issue??

```auto

for(var i = 0; i< xml_data.novedades.children().length(); i++){
					
	temp_btn = new btn_novedades_class;					
	temp_btn.texto.autoSize = TextFieldAutoSize.LEFT;
	temp_btn.texto.width = novedades.fondo.width - 10;
	temp_btn.x = 8;
					
	if(i > 0){
		temp_btn.y = items_novedades[i-1].y + items_novedades[i-1].height + 5;
	} else {
		temp_btn.y = 35;
	}
	
	items_novedades* = temp_btn;
	items_novedades*.addEventListener(MouseEvent.MOUSE_OVER,encender);
	items_novedades*.addEventListener(MouseEvent.MOUSE_OUT,apagar);	
	items_novedades*.buttonMode = true;
	
	novedades.addChild(items_novedades*);
					
}

```

TIA

Pier
