# Translation from AS 2 to AS 3

**URL:** https://forum.kirupa.com/t/translation-from-as-2-to-as-3/282034
**Category:** flash
**Created:** [February 17, 2009, 12:57am UTC](https://forum.kirupa.com/t/translation-from-as-2-to-as-3/282034 "2009-02-17T00:57:31Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Pherank](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pherank](https://forum.kirupa.com/u/Pherank)
#### Post date: [February 17, 2009, 12:57am UTC](https://forum.kirupa.com/t/translation-from-as-2-to-as-3/282034/1 "2009-02-17T00:57:31Z")

</div>

I could use some help translating this code:

```auto

for (var j = 0; j < columnArr*.length; j++) {
    var mc:MovieClip = this["attachClip_" + num].attachMovie("col_" + num + "_choice", "choice_" + j, j + 1);
}

```

There’s a var named “mc” that will refer to each clip called “attachClip” numbered from 0 to whatever the length of the “columnArr” array is. And each of those attachClip items will (addChild) add an item from the Library (col\_1\_choice, col\_2\_choice, col\_3\_choice, etc). Those are graphic icons that will be made clickable. The AS 2.0 code is nice and compact but I’m not doing a good job of coming up with an AS 3 equivalent.
