Oops, forgot to declare the i properly.
So again:

Function doLoop1():void{
  for (var i:int = 0; i < 10; i++) {
       trace('1st loop: ' + i);
 }
}

Function doLoop2():void{
  for (var i:int = 0; i < 10; i++) {
       trace('2nd loop: ' + i);
 }
}

If you would like the result outside of the function, use return varResult;


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to