Re: how to define gloabl varible in actionscript2

ok Duane thanks, i will try it.

Re: how to define gloabl varible in actionscript2

hello Duane,
I could not send the message in  a correct way,
I wrote the string like "{\"A\":\"abc\", \"B\":\"sfasd\",\"C\":\"erter\",\"D\":\"dfgfd\"}";

but it's showing "{"A":"abc", "B":"sfasd","C":"erter","D":"dfgfd"}";


i snip it by using wireshark, i think the only problem is i have to send the data in a correct format,
{"A":"abc", "B":"sfasd","C":"erter","D":"dfgfd"}";

Re: how to define gloabl varible in actionscript2

Hmmm, not sure what to do about it.   Flash really doesn't support JSON.

29 (edited by cbreeze 2011-11-10 15:24:41)

Re: how to define gloabl varible in actionscript2

Does this help at all: http://www.adobe.com/cfusion/exchange/i … id=1078469

There is also this: http://aralbalkan.com/880
With the direct class download here: http://aralbalkan.com/downloads/auto_js … ze_0.2.zip

I'm fairly sure I've used the JSON class before in a test, but need to dig through the archives.

Cheers.

Re: how to define gloabl varible in actionscript2

The problem is raw POSTing the JSON.

The first link appears to encapsulate the JSON in a LoadVars variable, not as a raw POST, which is probably what the poster's server is looking for.  The second link seems to be just about parsing and serializing JSON, not sending it to anyone.  I might be missing something, though.

We have a couple of widgets in the catalog that utilize JSON web services (for instance, Instagram) - we tend to use JSON->XML proxies for them (Google App Engine, etc).  I don't know of any services we currently use that require the POSTing of JSON.

Re: how to define gloabl varible in actionscript2

Thanks Duane and Cbreeze and i will try, thankssssssssssssssssss

Re: how to define gloabl varible in actionscript2

Hello cbreeze,
The first link http://www.adobe.com/cfusion/exchange/i … id=1078469 is for
Required product(s):     Flash 8
Compatible product(s):     Flash 8
and i am using flash 5 or 6

The second link might be useful, could you give me an example with a simple example
Object.prototype.toString = function()
Array.prototype.toString = function()
String.prototype.toString = function()
there are three different prototypes, how to use with my data, please give an example
my data is
var serverdata:String = {\"A\":\"abc\", \"B\":\"sfasd\",\"C\":\"erter\",\"D\":\"dfgfd\"}";
how to convert the string data into json and then send to server,
this is the important part for my chumby project, please if you can, give me solution. thankssssssssssssssssss