【发布时间】:2013-01-25 11:14:21
【问题描述】:
如何在 AS3 中使用字符串键定义字典?以及如何进行读取操作? 例如:
var Dic:Dictionary = new Dictionary();
Dic["Exhausted"] = "He who talks more is sooner exhausted, please keep smiling :)";
String str = str.substring(8,str.length-1); // == str = "Exhausted";
trace('Dic[' + str + '] = ' + Dic[str]);
输出是 Dic[Exhausted] = undefined???!!
为什么?
【问题讨论】:
标签: string actionscript-3 dictionary key