Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 5th, 2012  |  syntax: None  |  size: 0.27 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Accessing an element of an array of a dynamic class
  2. myClass["variable"] = 4;
  3.        
  4. myClass["array[0]"] = 4;
  5.        
  6. trace(myClass.array[0]);
  7.        
  8. trace(myClass["array[0]"]);
  9.        
  10. var o:Object = {};
  11. o["array"] = [];   //we do have to insantiate the array first
  12. o["array"][0] = 4;