# Loop issues

**URL:** <https://forum.kirupa.com/t/loop-issues/286974>\
**Category:** Uncategorized\
**Created:** [April 23, 2009, 8:48pm UTC](https://forum.kirupa.com/t/loop-issues/286974 "2009-04-23T20:48:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![randallpjenkins](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@randallpjenkins](https://forum.kirupa.com/u/randallpjenkins)\
**Post date:** [April 23, 2009, 8:48pm UTC](https://forum.kirupa.com/t/loop-issues/286974/1 "2009-04-23T20:48:38Z")

</div>

So I’m super new to AS3 and even AS@, so I’m probably doing something stupid, but none the less, this is my code for tect roll over colour change.

```auto
for (var i:Number=1; i<=8; i++) {
	root["txt_txt"+i].addEventListener(MouseEvent.MOUSE_OVER, changer);
	root["txt_txt"+i].addEventListener(MouseEvent.MOUSE_OUT, changer);
}

function changer(e:MouseEvent):void {

	if (e.type=="mouseOver") {
		root["txt_txt"+i].textColor=0x3E8C9F;
	} else {
		root["txt_txt"+i].textColor=0x614A23;
	}
}

```

I get no errors on export, but on rollover I wind up with…  
“TypeError: Error #1010: A term is undefined and has no properties.  
at Header\_fla::MainTimeline/frame1()”

Any ideas…
