# Can this be done in an array?

**URL:** <https://forum.kirupa.com/t/can-this-be-done-in-an-array/92773>\
**Category:** Uncategorized\
**Created:** [October 21, 2003, 2:51pm UTC](https://forum.kirupa.com/t/can-this-be-done-in-an-array/92773 "2003-10-21T14:51:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Inflicted](https://avatars.discourse-cdn.com/v4/letter/i/82dd89/32.png) [@Inflicted](https://forum.kirupa.com/u/Inflicted)\
**Post date:** [October 21, 2003, 2:51pm UTC](https://forum.kirupa.com/t/can-this-be-done-in-an-array/92773/1 "2003-10-21T14:51:36Z")

</div>

I have a movie with 6 containers that load jpg’s: container\_1, container\_2 etc.  
They all have the same action. Instead of copying the code for every instance, can I put this in an array?

How would I do that? Couldn’t find the appropriate tut or thread.

```auto
container_1._alpha = 0;
this.onEnterFrame = function() {
        loadMovie("image1.jpg", "container_1");

```

Any help’s appreciated!

regards
