# Is it possible to do this with an array?

**URL:** <https://forum.kirupa.com/t/is-it-possible-to-do-this-with-an-array/327430>\
**Category:** flash\
**Created:** [February 29, 2012, 2:51am UTC](https://forum.kirupa.com/t/is-it-possible-to-do-this-with-an-array/327430 "2012-02-29T02:51:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rimacy](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@rimacy](https://forum.kirupa.com/u/rimacy)\
**Post date:** [February 29, 2012, 2:51am UTC](https://forum.kirupa.com/t/is-it-possible-to-do-this-with-an-array/327430/1 "2012-02-29T02:51:08Z")

</div>

A movieClip has the name pE1, when the user clicks the movieClip the event handler catches the event.currentTarget.name (pE1) then I want to use this string to tell a child class(\_model) to add an object(engine: object) of that same name(pE1) to an array within that child class.

I’ve been trying things like:

```auto
var obP:Engine =_model.allEnginesArray[getChildByName(e.currentTarget.name)];
_model.examineEngineList.push(obP);

```

Any thoughts?
