AS 3.0 Collections framework

0 views
Skip to first unread message

Alexander M Patrikalakis

unread,
Mar 14, 2010, 10:43:49 PM3/14/10
to 68...@googlegroups.com
My PixelCheckerboard implementation used a Dictionary but I found the Dictionary class very limiting as a collection, especially when you compare it to the Map Collection in the Java.util collections framework.

Is there an AS 3.0 analogue to the Java Collections framework?

Alex

Maria Rodriguez

unread,
Mar 14, 2010, 10:47:26 PM3/14/10
to 68...@googlegroups.com
If you define your keys as what the toString method returns on the location, it makes keeping track of the images pretty straightforward.
--
Maria I. Rodriguez
Massachusetts Institute of Technology
Electrical Engineering & Computer Science
Class of 2011

Tobe Nwanna

unread,
Mar 14, 2010, 10:49:52 PM3/14/10
to 68...@googlegroups.com
If you do that, you don't even need to use a dictionary as there's a function called getChildByName(string)

Alexander M Patrikalakis

unread,
Mar 14, 2010, 10:49:58 PM3/14/10
to 68...@googlegroups.com
I mapped checkers to images and got it to work. I was asking more in general terms. I think a map/dictionary could be more useful if you could iterate over the keys.

Sent from my iPhone

Maria Rodriguez

unread,
Mar 14, 2010, 10:56:37 PM3/14/10
to 68...@googlegroups.com

Alexander M Patrikalakis

unread,
Mar 14, 2010, 10:57:50 PM3/14/10
to 68...@googlegroups.com
got it thanks

alex
Reply all
Reply to author
Forward
0 new messages