# Stop the looping of an array

**URL:** <https://forum.kirupa.com/t/stop-the-looping-of-an-array/248713>\
**Category:** Uncategorized\
**Created:** [January 11, 2008, 12:16am UTC](https://forum.kirupa.com/t/stop-the-looping-of-an-array/248713 "2008-01-11T00:16:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![b\_arry](https://avatars.discourse-cdn.com/v4/letter/b/9fc29f/32.png) [@b\_arry](https://forum.kirupa.com/u/b_arry)\
**Post date:** [January 11, 2008, 12:16am UTC](https://forum.kirupa.com/t/stop-the-looping-of-an-array/248713/1 "2008-01-11T00:16:59Z")

</div>

How can i stop this array from looping. I just want the images to fade in once then stop after theyre done.

import mx.transitions.Tween;  
import mx.transitions.easing.\*;

var mc\_arr = [num\_mc1,num\_mc2,num\_mc3];  
var counter = 0;

function tweenIn(target\_mc:MovieClip){

```
var image1_a:Tween = new Tween(target_mc, "_alpha", Regular.easeIn, 0, 100, 1, true);
image1_a.onMotionFinished = function() {
  counter = (counter &lt; mc_arr.length-1) ? counter+1 : 0;
    tweenIn(mc_arr[counter]);
};

```

}  
tweenIn(mc\_arr[counter]);
