I made an AS2.0 class that implements a similar interface to the Java List Iterator. This class is useful for going through every element in an Array, but without the famous i++ variable.
A nice use of this class is when you have a loop on an EnterFrame so that you don’t need to maintain the variable i across the frames but simply evaluate hasNext() and call next() if there are more elements.
If you want to know more about this Interface you can take a look in the
Sun site.
You can download the
source and an example.
You can
view the code in the browser.