# Working with array and attachMovie

**URL:** <https://forum.kirupa.com/t/working-with-array-and-attachmovie/201779>\
**Category:** flash\
**Created:** [September 25, 2006, 3:03am UTC](https://forum.kirupa.com/t/working-with-array-and-attachmovie/201779 "2006-09-25T03:03:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lacus](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@Lacus](https://forum.kirupa.com/u/Lacus)\
**Post date:** [September 25, 2006, 3:03am UTC](https://forum.kirupa.com/t/working-with-array-and-attachmovie/201779/1 "2006-09-25T03:03:06Z")

</div>

Hi,  
Sorry for the troubles again…\>.\<

```auto

var numOfChars = 0;
setCharacters = new Array();
 
  if (empty1.hitTest(_xmouse,_ymouse,false))
  {
     numOfChars = numOfChars + 1;
     empty1.duplicateMovieClip("setChar"+numOfChars,numOfChars);
     setProperty ("setChar"+numOfChars, _x, "200");
     attachMovie("char1","setChar"+numOfChars,numOfChars);
     setCharacters.push("setChar" + numOfChars);
  }

```

if i want to use them after another hitTest, would it be:

```auto

 for(i = 0; setCharacters.length > i; i++){
  if (setCharacters*.hitTest(_xmouse,_ymouse,false))
  {
   startDrag(_root.setCharacters*);
  }
 }

```

I’m not really good with codings so really have to learn alot…  
Thank you very much.

Regards,  
Lacus
