Hello :) Your code is in AS3 ? In AS3 :
var i:int ; // only one for ( i = 0; i < 10; i++) { trace('1st loop: ' + i); } for ( i = 0; i < 10; i++) { trace('2nd loop: ' + i); } The FlashPlayer 9 or 10 optimize the variables and you must implement a variable one time in the same expression of code ;) eKA+ :) 2008/12/23 Alexander Farber <alexander.far...@gmail.com> > Hello, > > has anybody else noticed, that the code like: > > stop(); > > for (var i:Number = 0; i < 10; i++) { > trace('1st loop: ' + i); > } > > for (var i:Number = 0; i < 10; i++) { > trace('2nd loop: ' + i); > } > > won't be accepted by compiler? > Is there an explanation for that? > The other languages wouldn't complain here > > Regards > Alex > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders