The timeout runs after the loop completes. The callback will use the current value of i, and the loop leaves it at 10. So naturally, that is what the timeout will see.

I fail to see the purpose of setting a timeout in a loop like this. Just move the loop to inside the timeout. This way, you can have proper values of i and avoid lots of needles timeouts/function calls/work.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to