# Array problem

**URL:** <https://forum.kirupa.com/t/array-problem/281209>\
**Category:** Uncategorized\
**Created:** [February 6, 2009, 1:12am UTC](https://forum.kirupa.com/t/array-problem/281209 "2009-02-06T01:12:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![evilexplorer](https://avatars.discourse-cdn.com/v4/letter/e/e56c9b/32.png) [@evilexplorer](https://forum.kirupa.com/u/evilexplorer)\
**Post date:** [February 6, 2009, 1:12am UTC](https://forum.kirupa.com/t/array-problem/281209/1 "2009-02-06T01:12:48Z")

</div>

I have an annoying problem in flash. I have an array that lists movieclips. When I add a movieclip to the stage, I want to add it to the list (not as a string.) I use a string variable and add \_root. to the beginning of it to do this. Unfortunately it lookes for the variable itself instead of what string it stands for when I run it. :sen:

movieList = new Array();  
if (duplicate) {  
\_root.enemy.duplicateMovieClip(“enemy”+i, i);  
new\_MC = “enemy”+i  
movieList[movieList.length] = \_root.new\_MC;  
i++;  
}

thanks in advance :bounce:
