For loop counter not resetting

Hi, so I have a class method that contains a for loop … however, each time I call the class method, the for loop counter continues to count from where it left off! Agh - can anyone help me make sure the loop counter get’s reset?
[AS]
//sliders.length = 5

private function test():void
{
var i:Number = 0;
for (i=0; i<sliders.length; i++)
{
var time:Number = i*0.5;
trace(‘i:’+i+’ | time:’+time);
}
}

tmp.test();
tmp.test();
[/AS]
This traces:
i:0 | time:0
i:1 | time:0.5
i:2 | time:1
i:3 | time:1.5
i:4 | time:2

i:5 | time:2.5
i:6 | time:3
i:7 | time:3.5
i:8 | time:4
i:9 | time:4.5