as3corelib
as3corelib copied to clipboard
JSONParseError: Unexpected c encountered
Originally filed by sandlerg on 2010-02-23T13:43:34
What steps will reproduce the problem?
- I am passing JSON from flashvars to an as3 flash file
- HTML code:
- AS3 code: import com.adobe.serialization.json.JSON ccbtn.addEventListener( MouseEvent.CLICK, handleMouseClick); function handleMouseClick (event:MouseEvent):void { var params:String = stage.loaderInfo.parameters.params; //pass in JSON var paramsData:String = JSON.decode(params); //decode the JSON string textBox.text = paramsData; //write output to text box on button click }
- What is the expected output? What do you see instead? I am expecting to parse out the JSON string in as3. Instead, I am getting
- What version of the product are you using? On what operating system? Flash 10 file, as3
Please provide any additional information below. I am quite new to this, so please go easy on me.