AS3 Classes, hard to explain. please read and help

[SIZE=2]So at one point in my life i thought i was pretty good at AS3, but then classes got involved. This is a bit more to take in so bear with me here:

I have *x *amount of sprites on the screen, all with different heights, and i want to place them equal distances from each other across the y-axis. I was able to accomplish this. but i want to be able to use it with the use of a class, both for practice and easy reuse. Not entirely sure how to go about this.

Here is what i had originally and it worked fine:

for (var i=0; i<obj.length; i++) {
    totalHeight += obj*.height;
}

var temp2 = 0;

function separate():void {
    dist = (stageHeight-totalHeight)/obj.length+1;
    for (var j=0; j<obj.length; j++) {
        obj[j].y = temp2+dist/2;
        temp2 += obj[j].height+dist;
    }
}

Any help with [SIZE=2]how to use [SIZE=2]th[SIZE=2]is[SIZE=2] concept with [SIZE=2]a class[SIZE=2]? [SIZE=2]Thanks[SIZE=2]! (and merry [SIZE=2]Christmas for those to whom[SIZE=2] it may apply) :P[/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE]
[/SIZE]