[AS 2.0] Looping can't stop

hi there , this is my first post
i’m still newbie and i try to use this looping but it can’t stop ,

springload();

function springload():Void
{
var dfly_depth:Number = 10;
var border_depth:Number =2;

attachMovie("border_mc","border_mc",border_depth);
createdfly();

}

//Border Dimentions setting
var topBorder:Number = 50
var leftBorder:Number = 0
var botBorder:Number = border_mc._height;
var rightBorder:Number = border_mc._width = 700;

/*
*Dragonfly function
*/

function createdfly():Void
{
spawndfly = 0;
border_mc.onEnterFrame = function ()
{
spawndfly++; // Time to spawn
for(i=0;i<5;i++)
{
if (spawndfly == 45) //// <<<— i wonder if the looping cant stop because of this …
{

                //attach  movieclip from the library

[SIZE=1]var tempdfly = border_mc.attachMovie(“dfly_mc”, “dfly_mc”+border_mc.getNextHighestDepth(), border_mc.getNextHighestDepth(),{_x:random(400), _y:random(330)});[/SIZE]
spawndfly = 0;
}
}
}
}

i try to trace the i and the spawndfy , n what i get is getting confused …

i’ll use the “spawndfy” to make dragonfly spawn one by one …

Thx so much for the attention