hey how to create unsigned arrays with keys in actionscript 3?
in php its simple:
array('key' => 'val');
in ac3 you can create unsigned arrays like that:
['val']
['key': 'val'] // breaks
hey how to create unsigned arrays with keys in actionscript 3?
in php its simple:
array('key' => 'val');
in ac3 you can create unsigned arrays like that:
['val']
['key': 'val'] // breaks
An Object instance, because it is a dynamic class, can contain dynamic properites which works as a sort of associative array.
var object:Object = new Object();
object["foo"] = "Pedro";
object["bar"] = "Juan";
object["may day"] = "Enrique";
trace(object["foo"]); //Pedro
trace(object["bar"]); //Juan
trace(object["may day"]); //Enrique
Notice that the use of [] with an object is actually a way to access and define properties named like the string passed:
trace(object.foo); //Pedro
trace(object.bar); //Juan
//And I don't know how to access "may day"