http://blog.donews.com/cnsoft/archive/2012/05/03/1582972.aspx
Type 1120: Access of undefined property JSON
无法明确解析多名称引用 JSON
https://github.com/mikechambers/as3corelib/issues/171
If you’re using as3corelib like I’ve been using for quite some time now, you will notice this error. To fix it you simply need to remove the following import (it may vary based on your project structure):
import com.adobe.serialization.json.JSON;
and then you’ll need to modify your code to replace:
JSON.decode(myString);
and
JSON.encode(myObject);
to:
JSON.parse(myString);
and
JSON.stringify(myObject);
You can find the full details of the new implementation of the native JSON support in AS3 on Adobe’s Reference Site
解决办法是移除那个 import 然后把对应的函数名改掉.
本文介绍了解决AS3中使用as3corelib库时出现的Type1120错误的方法。通过移除特定导入并替换JSON解码和编码函数,可以有效避免此问题。

2968

被折叠的 条评论
为什么被折叠?



