# Help with Actionscript 2 Array Loop

**URL:** <https://forum.kirupa.com/t/help-with-actionscript-2-array-loop/304239>\
**Category:** flash\
**Created:** [February 4, 2010, 4:39am UTC](https://forum.kirupa.com/t/help-with-actionscript-2-array-loop/304239 "2010-02-04T04:39:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![orionstar](https://avatars.discourse-cdn.com/v4/letter/o/51bf81/32.png) [@orionstar](https://forum.kirupa.com/u/orionstar)\
**Post date:** [February 4, 2010, 4:39am UTC](https://forum.kirupa.com/t/help-with-actionscript-2-array-loop/304239/1 "2010-02-04T04:39:43Z")

</div>

Hello, I am trying to cycle through targeted movieclips via an array.  
The symbols are labeled as such, kali1, kali2, kali3, …etc.  
What I wanted to do was to move selected movieclips to a particular frame via an array loop.  
Apparently, I am doing something wrong.

Here is the code I am using and the output I get:

var col1:Array = [8,16];  
for (i=0; i\<col1.length ; i++){  
kaliscope= “kali”+col1;  
this[“kali” + col1].gotoAndPlay(21);  
trace (kaliscope);

Output I get is this:  
kali8, 16  
kali8, 16

What I was hoping to get was:  
kali8  
kali16

Any help would be greatly appreciated.

Thanks in advance.

Please note, I am a novice coder.
