Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON.decode undefined method #185

Closed
ChazUK opened this issue Jun 7, 2012 · 3 comments
Closed

JSON.decode undefined method #185

ChazUK opened this issue Jun 7, 2012 · 3 comments

Comments

@ChazUK
Copy link

ChazUK commented Jun 7, 2012

Hi,

I recently upgraded to CS6, and had to re-setup all of my AS3 library links. I created a main folder called lib/ and then copied caurina Tweener (/caruina/transitions/...), greensock (/com/greensock/...) and as3corelib (/com/adobe/...) into the lib folder.
Now a previous file I had working is throwing up errors that JSON.decode isn't a defined method..

jsonData = JSON.decode(dataLoader.data);
Call to a possibly undefined method decode through a reference with static type Class.``

However... jsonData = com.adobe.serialization.json.JSON.decode(dataLoader.data); Works perfectly.

Is there a class clash that I'm not seeing here? It's a clean install of CS6, and those are the only scripts I've added to my libs folder.

Thanks for the help

@ChazUK
Copy link
Author

ChazUK commented Jun 20, 2012

I'm sorry but I'm going to bump this because I can't figure out how to fix this. And it kinda makes this class impossible to use!

Has anyone else got this problem? And does anyone have a solution?

@zechdc
Copy link

zechdc commented Aug 24, 2012

Solution

  1. Go to File > Publish Settings...
  2. Change Target from Flash Player 11 to Flash Player 10.3 or lower

If you need to publish in Flash Player 11 or greater then use the native flash JSON class. Look into the native JSON class and the static parse() and stringify() methods.

Source:
http://forums.adobe.com/message/4561200

@jhey
Copy link

jhey commented Jul 30, 2013

thanks for the tip @ChazUK !

@ChazUK ChazUK closed this as completed Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants