# Tracing mult MC on the stage

**URL:** https://forum.kirupa.com/t/tracing-mult-mc-on-the-stage/179660
**Category:** flash
**Created:** [February 22, 2006, 2:28am UTC](https://forum.kirupa.com/t/tracing-mult-mc-on-the-stage/179660 "2006-02-22T02:28:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Tattered](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@Tattered](https://forum.kirupa.com/u/Tattered)
#### Post date: [February 22, 2006, 2:28am UTC](https://forum.kirupa.com/t/tracing-mult-mc-on-the-stage/179660/1 "2006-02-22T02:28:43Z")

</div>

Ok I have 4 MC on the main timeline and each one is named MC\_0 too MC\_3. I want to be able to trace which on you pressed. I have my code in a new layer, and Im not really sure what I have gotten wrong. I keep getting “undefined”.

```auto

for (i=0; i<=4; i++) {
	eval("_root.MC_"+i).onPress = function() {
		trace(eval("_root.MC_"+i));
	}
}

```
