FlashSocket.IO icon indicating copy to clipboard operation
FlashSocket.IO copied to clipboard

Access of undefined property JSON -- str += JSON.stringify(obj.data);

Open dogslife opened this issue 10 years ago • 6 comments

Cannot get socketFlashIO to complie in FLash IDE keep getting the above error

dogslife avatar Feb 10 '16 14:02 dogslife

So I think this isn't an issue with the library, but that you are trying to compile it to run with flash player < v11 which is when the built in JSON API was introduced. So either you can use Flash Player 11+, or you can replace the calls with something else like https://github.com/mikechambers/as3corelib or https://github.com/mherkender/actionjson

redannick avatar Feb 10 '16 15:02 redannick

Thanks @redannick ... Apologies in advance for what is problably a dumb question... but, given that I have nothing working at present and I'm a total novice in my late 50's could you possibly give me an example of how I might replace the calls?

dogslife avatar Feb 10 '16 15:02 dogslife

Clarification: redannick's fork does not use native JSON (but as3corelib) so it might work with Flash Player 10 (I haven't test it). Your best bet is to try this, it generally works fine.

Your issue is with my fork that does indeed use native JSON (so the issue should be opened in my fork). It is tested with FP 11.2, making it work with FP 10 requires to replace at least JSON (easy), SecureSocket (harder) and likely a bunch of other stuff.

Do you really need to support FP 10? Version 11 came out close to 5 years ago, Chrome has new versions built-in and Firefox won't let you run such ancient versions!

chatziko avatar Feb 10 '16 16:02 chatziko

Hi @Chatziko, thanks... I don't really want to support Flash 10 . Chrome has its own version of Flash which is a reduced version and my app runs fine on Firefox. I am looking to move to 11, in fact I am just reading about 11.2 now that I know there is this issue. I thought I was going insane??!! Your fork is the last piece in the jigsaw.... I'm just playing with Node.js,Redis, socket.io so that I can get realtime updates. My requirements are very simple but I feel so totally out of my depth. Would you like me to re-raise this issue on your fork?

dogslife avatar Feb 10 '16 18:02 dogslife

If the problem appears with v11.2 or above feel free to open an issue. That's the minimum requirement I've set for my fork (not going to support versions before this).

chatziko avatar Feb 10 '16 19:02 chatziko

@chatziko Toally understand your approach and I agree. Thank you for your understanding and support thus far.

dogslife avatar Feb 10 '16 19:02 dogslife