Font size bug

I mod’d the scrollbar tutorial that I found at Kirupa.com to scroll some text fields I have.

Basically I have a movie clip, into which I add textfields at runtime. The problem is that when I have just 2 textfields, they expand to occupy the about 50% of the total size of the movie clip (ie about 25% each), and the font size becomes huge. When I have 20 textfields they’re all squished into tiny spaces, and the font sizes reduces.

This is inspite of declaring the text fields like so, and setting their text formats to the same format:

<declaration codes…>
var text_fmt:TextFormat = new TextFormat();
text_fmt.font = “Arial”;
text_fmt.size = 8;
for (i = 1; i <= total_photos ; i++) //total_photos is read from a file
{
//create text boxes
s = “p” + i;
var sTime = eval(“myEvents.time” + i)
_level0.mc.createTextField(s, 20 + i, 10, 20 * (i-1) + 15, 150, 20);
_level0.mc[s].setNewTextFormat(text_fmt);
_level0.mc[s].multiline = false;
_level0.mc[s].embedFonts = false;
_level0.mc[s].antiAliasType = “normal”;
_level0.mc[s].textColor = 0x7D7171;
_level0.mc[s].text = eval(“myEvents.caption” + i);
if ((i & 1) == 0){
_level0.mc[s].background = true;
_level0.mc[s].backgroundColor = 0xffffff;
}
else{
_level0.mc[s].background = false;
}
_level0.mc._height = total_photos * 25;

}

I’m a relative newbie to Flash, so any help would be much appreciated.

TIA
pram