# Accessing mc:s...How?

**URL:** https://forum.kirupa.com/t/accessing-mc-s-how/104964
**Category:** Uncategorized
**Created:** [March 21, 2004, 5:27pm UTC](https://forum.kirupa.com/t/accessing-mc-s-how/104964 "2004-03-21T17:27:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rave\_t](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@rave\_t](https://forum.kirupa.com/u/rave_t)
#### Post date: [March 21, 2004, 5:27pm UTC](https://forum.kirupa.com/t/accessing-mc-s-how/104964/1 "2004-03-21T17:27:16Z")

</div>

I have this line of code:

endX = \_root.followme\_mc\_0.\_x;

if i in a for-loop would like to adress, say 10 of these mc:s how do i write the code so i dont need to do like this:

endX0 = \_root.followme\_mc\_0.\_x;  
endX1 = \_root.followme\_mc\_1.\_x;  
endX2 = \_root.followme\_mc\_2.\_x;  
endX3 = \_root.followme\_mc\_3.\_x;  
endX4 = \_root.followme\_mc\_4.\_x;  
.  
.  
.

I would like to do it in a for loop instead  
the problem is: How do i target the mc?

I have tried this:  
for(t=0;t\<10;t++)  
endX[t] = _root.followme\_mc_[t].\_x

but that doesnt work!

Any ideas??
