Like Arrays, the Dictionary Class associates values with a key. However, unlike Arrays, Dictionary keys do not have to be numeric indexes, they can be any object opening a wide array (pardon the pun) of unique opportunities.
For reference, here is the basic syntax:
import flash.utils.Dictionary;
var obj:Object = new Object();
var myDictionary:Dictionary = new Dictionary();
myDictionary[obj] = 'This is the value of the Dictionary key obj';
trace (myDictionary[obj]);
Check out Grant Skinner’s blog, for a general overview of the Class.
No comments:
Post a Comment