2

The error I'm getting is

JSONParseError: Unexpected < encountered
    atcom.adobe.serialization.json::JSONTokenizer/parseError(

I'm using flash player 10.2.

Has anyone come across this before? Seems odd that its publishing fine from within flashdevelop (using open in tab or open in window) but fails when I use the flash player.

I have checked the feed using JSONView and it seems ok.

Tom
  • 12,591
  • 13
  • 72
  • 112
  • Hmm I remember of this problem. It happened when I opened directly the SWF with the Flash PLyer file instead of the HTML wrapper. +1 for the question, I'm interested too... – Florian F Mar 16 '11 at 17:43
  • Yep sounds like the same problem I'm having, works in browsers as well. No good for me as I need to create a projector file :/ – Tom Mar 16 '11 at 17:50
  • I suggest you download the sources of as3corelib and debug both versions to see what is changing – Florian F Mar 16 '11 at 17:55
  • have found the answer :) will post below – Tom Mar 16 '11 at 17:59

2 Answers2

1

Found the answer, needed to add a custom request header

request.requestHeaders.push(new URLRequestHeader("Accept", "application/json"));

Am guessing this is added automatically through the ide / browser maybe? Fixed it for me anyway :)

Tom
  • 12,591
  • 13
  • 72
  • 112
0

For the different verions: Is your standalone version of Flash Player the same as your browser one? When you select "open in (flashdevelop) tab" it uses the ActiveX version, when you select "Open in Window" it uses the ActiveX or Netscape plugin depending on your browser. When you chose the default "play", it'll play in the standalone version of Flash Player.

All 3 of these can be different versions. Also note that when you use the standalone version, Flash will select the last one opened. E.g., if you have 2 standalone exes on your computer (say 10.1 and 10.2), whichever was the last opened is your default - so just open whichever one you want to use.

All that said, your problem is your JSON feed :D

It seems you have a token wrong, but without the feed, it's hard to say more

divillysausages
  • 7,883
  • 3
  • 25
  • 39