Skip navigation
Hoai Dinh 123
Currently Being Moderated

var JSON is not defined in flash professional cs6

Aug 8, 2012 11:10 AM

Hi everyone! i'm a newbie.

i'm running flash cs6 and attempting to use JSON calls that are in flash player 11.2. When i test movie, everything is fine. When i publish to swf, i have error:

ReferenceError: Error #1065: Variable JSON is not defined.

          at loading::loading/doCMD().

please tell me how to fix it. thanks.

 
Replies
  • Currently Being Moderated
    Aug 8, 2012 11:23 AM   in reply to Hoai Dinh 123

    Json is now supported natively in the new version.

     

    I used to use the adobe json serialization class: "import com.adobe.serialization.json.JSON" which when decoding used the function "JSON.decode()".

     

    The native JSON class has changed the function to 'JSON.parse()". So try removing the old json class import and changing all the decode functions to parse.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 8, 2012 11:50 AM   in reply to Hoai Dinh 123

    Are you testing that your browser has the most up to date flash version?

     

    If you are loading this movie as a child of another movie make sure the parent is compiled as the same version of flash as the child.

     

    Hmmm, otherwise not sure.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points