For loop question

Hi!

I have a simple form in Flash and I would like to apply some functions to my textfields. I would like to do it with a loop so that I wouldn’t have to add another function everytime i add another textfield.

Here are the functions:


myTextfield1.onSetFocus = function()
{
    textField_bg_1.gotoAndPlay("over");
    if(myTextfield1.text == myString1)
    {
        myTextfield1.text = "";
    }
}

myTextfield1.onKillFocus = function()
{
    textField_bg_1.gotoAndPlay("out");
    if(myTextfield1.text == "")
    {
        myTextfield1.text = myString1;
    }
}

Those Movieclips and varables that have a number 1 after them are the ones that would repeat in every loop. Anyone can help me?

-sumo-