# Nested dynamic variable

**URL:** <https://forum.kirupa.com/t/nested-dynamic-variable/282749>\
**Category:** Uncategorized\
**Created:** [February 26, 2009, 12:14am UTC](https://forum.kirupa.com/t/nested-dynamic-variable/282749 "2009-02-26T00:14:52Z")\
**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:** [February 26, 2009, 12:14am UTC](https://forum.kirupa.com/t/nested-dynamic-variable/282749/1 "2009-02-26T00:14:52Z")

</div>

I’ve never had to deal with a mc inside of an mc this way before… Basically they’re already on the stage and creating them dynamically would require recreating everything… Not worth it.

```auto

//14 total
for (var i:Number = 0; i < 14; i++){
	var mc:MovieClip = this["link"+i+"_mc"];
	//_root.subcontent_mc.links_mc.mc.onRelease = function(){
	mc.onRelease = function(){
		trace(i);
	}
	trace("link"+i+"_mc");
}

```

the commented line is pretty much what I’m trying to accomplish if that makes sense.
