AS3 and JSON : error 1061

前端 未结 2 1388
广开言路
广开言路 2021-01-14 22:18

I spent hours around a possibly stupid problem relative to JSON encoding in FLASH.

I Try to do something very simple : I make an object and I want it to be serialize

2条回答
  •  自闭症患者
    2021-01-14 22:41

    All right. As usual, I found the answer a few seconds after posting my question.

    JSON in now incorporated directly in As3, so no need to use com.adobe.serialization.json.JSON

    So I delete the import and replaced :

    var myJson:String = JSON.encode(myData);
    

    by

    var myJson:String = JSON.stringify(myData);
    

    and it works.

提交回复
热议问题