replace loop index type from Number to int to speed-up loop
http://upshots.org/actionscript/20-tips-to-optimize-your-actionscript