What is the best way to transfer JSON to and from a Flash movie?
Currently for communication between javascript and Flash:
- I use flashvars to transfer data to a flash movie when it initially loads
- I use 'ExternalInterface' at runtime to pass single values like booleans at runtime
I want to go to the next level and do it using JSON.
Initially, I just want the ability to send JSON to the flash movie when creating the instance, but later I will need to send the data back and forth.
I just want to do it right the first time and avoid any compatibility issues or "gotcha" if any. I don’t even know if I can pass the whole Flash object, or if I need to serialize it as a JSON string with cheese
source
share