# Dynamic access of a MovieClip created on stage in Flash

**URL:** <https://forum.kirupa.com/t/dynamic-access-of-a-movieclip-created-on-stage-in-flash/307023>\
**Category:** Uncategorized\
**Created:** [March 26, 2010, 10:23am UTC](https://forum.kirupa.com/t/dynamic-access-of-a-movieclip-created-on-stage-in-flash/307023 "2010-03-26T10:23:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![McFreaq](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@McFreaq](https://forum.kirupa.com/u/McFreaq)\
**Post date:** [March 26, 2010, 10:23am UTC](https://forum.kirupa.com/t/dynamic-access-of-a-movieclip-created-on-stage-in-flash/307023/1 "2010-03-26T10:23:53Z")

</div>

Hello guys,  
I am confronted with a simply yet annoying problem:

I manually created a row of MovieClips inside another movieclip »container\_mc« on the stage in the Flash CS4 Editor. The MovieClips are named in the same convention (eg. target\_1\_mc, target\_2\_mc, …target\_200\_mc).

When I try to access a property of it via AS3 during runtime of the SWF like this, it works:

container\_mc.target\_0\_mc.alpha = 0;

But how do I access the MovieClip dynamically? During runtime, a script will determine of which MovieClip i need to access a property. I will get the ID number of the MovieClip I want to access. So I need to be able to to something like this:

var mc\_ID:int = 2;

[“container\_mc.target\_”+mc\_ID+\_mc""].alpha = 0;

Obviously, that doesn’t work. When I would create all the target-MovieClips dynamically at runtime, I would simply put them in an array. But in this case I need to work with the existing MovieClips manually created in the Flash Editor.

Any ideas would be highly appreciated!!
