Create a Key Value Pair Object in Actionscript
March 5th, 2009
If this is essentially an ActionScript Dictionary, but if you don’t need some of the overhead a dictionary brings along, you can make a nice key value pair like this.
private var keyValuePair:Object = {"processor_TotalPercentTime_value" : "processor_color",
"network_value" : "network_color",
"network_value" : "network_color",
"disk_DiskSecPerTransfer_value" : "disk_color",
"disk_KBytesPerTransfer_value" : "disk_color",
"memory_PLE_value" : "memory_color",
"memory_LazyWrites_value" : "memory_color",
"memory_AvailableMBytes_value" : "memory_color",
"MachineName":"sql_color"};
You would reference the keyValuePair as follows:
var myVal = keyValuePair["processor_TotalPercentTime"].toString();


