You have to be careful with for loops like that. You can get errors if you don't data type i
for (var i:Number = 1; i < 6; i++) { blah blah blah}