我的flex4.6在调试中正常工作。但是当我创建发布版本时,我得到了:
类型错误: 错误 #1009: 无法访问空对象引用的属性或方法。
at com.adobe.serializers.utility::TypeUtility$/getArrayType()at com.adobe.serializers.json::JSONDecoder/parseObject()at com.adobe.serializers.json::JSONDecoder/parseValue()at com.adobe.serializers.json::JSONDecoder/decode()at com.bravolucy.football.utilities::Utilities$/getAsObj()
看来:
http://forums.adobe.com/message/4250338
原始项目是在flex4.0中完成的,它使用了一些swc库。
你的问题的答案在你的问题本身
"原始项目是在flex4.0中完成的,它使用了一些swc库"
在这段之前,有人说
flex4.6 在调试中正常工作
它应该在 4.6 中工作正常,因为在这个版本的 playerglobal.version 11.1 中正常使用,其中包含 JSON 库,但之前的版本是 playerglobal - 11,您需要在项目库中包含"as3corelib.swc"。
您可以在 - http://blog.infrared5.com/2011/07/working-with-native-json-in-flash-player-11/中找到更多详细信息
谢谢
瓦伦
在项目属性中添加并勾选as3corelib.swc。
但更好的是切换到原生JSON.parse