Flash actionscript List and Dictionary<key, value> equivalents
Does Flash Actionscript have List and Dictionary equivalents? I'v开发者_运维知识库e only found the documentation for the Array.
The equivalent of List
is Vector
: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/Vector.html
I don't think there's a generic (typesafe) dictionary, but the docs for Dictionary
are: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/Dictionary.html
if you need a hash table with typed values, try the following:
[ArrayElementType("Type")]
public var newTypeProperty:Array;
/*and instead of 'newTypeProperty.push();', use newTypeProperty[key] = value*/
it should work, but i'm lazy enough to try myself, so plz let me know if you'll get any results
精彩评论