MLNTN

Maniacal musings of a pixel perfectionist

Archive for May, 2008

Iterating through objects, the easy way

Posted by Jared On May - 8 - 2008

Objects in any ECMAScript language (Javascript, Actionscript, Jscript, etc) are very powerful for – among other things – storing data. However, getting some information out of these objects can be a hassle sometimes.

I ran into this issue recently and wrote some cool little handlers for objects. The following methods can be used to iterate through an array manually. I wrote them for Actionscript, but they certainly work for Javascript – although I’d suggest one small modification (shown later). Read the rest of this entry »