# f8 - arranging MC's into columns

**URL:** <https://forum.kirupa.com/t/f8-arranging-mcs-into-columns/171899>\
**Category:** flash\
**Created:** [December 9, 2005, 1:37am UTC](https://forum.kirupa.com/t/f8-arranging-mcs-into-columns/171899 "2005-12-09T01:37:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![unit009](https://avatars.discourse-cdn.com/v4/letter/u/e19b73/32.png) [@unit009](https://forum.kirupa.com/u/unit009)\
**Post date:** [December 9, 2005, 1:37am UTC](https://forum.kirupa.com/t/f8-arranging-mcs-into-columns/171899/1 "2005-12-09T01:37:14Z")

</div>

```php
var i:Number = 0;
function goMe(){ 
if (i >= myArray.length){
	clearInterval(myInterval);
	i="0";
	}
eval(myArray*.instance).slideTo(0,i*myArray*.instance._height,1,"easeOutBounce");
i++;
}

```

i’m using this code to cycle through an array and move the movie clips to x:0, and y:height of clip, times whatever number it is… if there are 4 objects in the array, object 1 would be 1 times it’s own height… etc… so they’re spaced out.

however, when i resize my stage, i’d like to have them arrange differently… into columns… but i’m not sure how to specify breaking them off into columns. i tried something like this:

```php

var cCount:Number = 2;
var rCount:Number = 1;
function goMe2(){ 
//number of columns to make

//number of rows in each column

//height of each item in row
var itemHeight:Number = myArray[1].instance._height;
//width of each column
var colWidth:Number = myArray[1].instance._width;
if (i >= myArray.length){
	clearInterval(myInterval);
	i="0";
	rCount=0;
	}
	if(rCount<="2"){
eval(myArray*.instance).slideTo(0,rCount*itemHeight,1,"easeOutBounce");
	rCount++;
	i++;
	}else{
eval(myArray*.instance).slideTo(cCount*colWidth,cCount*rCount,"easeOutBounce");
	rCount++;
	i++;
	}
}	
	

```

… but it didn’t sort correctly

you can see what i mean here: [http://www.ericgibb.com/sd.html](http://www.ericgibb.com/sd.html)
