# Looping through movieclips

**URL:** https://forum.kirupa.com/t/looping-through-movieclips/294721
**Category:** Uncategorized
**Created:** [August 18, 2009, 11:39pm UTC](https://forum.kirupa.com/t/looping-through-movieclips/294721 "2009-08-18T23:39:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Mak\_Valley](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Mak\_Valley](https://forum.kirupa.com/u/Mak_Valley)
#### Post date: [August 18, 2009, 11:39pm UTC](https://forum.kirupa.com/t/looping-through-movieclips/294721/1 "2009-08-18T23:39:39Z")

</div>

```auto

for (var i:Number = 0; i < numans; i++){
		var n:Number = i+1;
		var pct:Number = Math.floor((this['res'+n]/lrestotal)*100);
		this['pct'+n] = Math.floor((this['res'+n]/lrestotal)*100)+"%";
		
		trace(this['ans'+n]+": "+this['res'+n]+" votes, "+pct+"%");
		//var **** = this['_level0.poll_mc.results_mc.ans'+n+'_txt'];
		// ****.text = this["ans"+n];
		
		// this line below
		this["_root.poll_mc.results_mc.ans"+n+"_txt"].text = this["ans"+n];
	}

```

pretty much the last line is what i’m trying to do… i can’t find documentation or anybody with a similar problem. any help is greatly appreciated.
