[flexcoders] Re: ExternalInterface erros

2009-01-12 Thread flexaustin
Here is the string being passed. The JSONEncoder encodes the object
into a string (data var in this case) then passes it over using
externalInterface.

data:String =
{"error":0,"requests":0,"group":true,"model":"userdefined","count":0,"name":"\"\\error\\Something\"
YOU $ 
'FBar'","connection":0,"warning":0,"title":"\"\\error\\Something\"
YOU $  'FBar'","type":"BigCategory","id":43}




--- In flexcoders@yahoogroups.com, "Ralf Bokelberg"
 wrote:
>
> Why do you want to use JSON? You can pass in plain objects instead, e.g.
> 
> ExternalInterface.call("someJSMethod", { a: 1, b: { c: true, d:
"hello"} } );
> 
> Ralf.
> 
> On Mon, Jan 12, 2009 at 7:55 PM, flexaustin  wrote:
> > I can't really post the code. The issue is either I think is either
> > one of two things, but I can't seem to resolve either of them.
> >
> > #1. I am passing data to a javascript function in json format, which
> > contains escaped " & \.
> >
> > #2. This is the issue.
> >
http://joshblog.net/2008/01/03/flash-player-externalinterface-variable-name-bug/
> > On this one I tried putting my function call in '' to as this blog
> > post suggests, but it didn't help.
> >
> > The JSONENcoder is escaping the " and \ on the flex/actionscript side,
> > but when it is getting passed to the javascript file I don't think the
> > javascript file is understanding the escaped items. I am not a JS guy
> > so I don't know if JS/Broswer knows about escaped characters?
> >
> > TIA, J
> >
> > --- In flexcoders@yahoogroups.com, "Anthony DeBonis"  wrote:
> >>
> >> -What browser are you using - or does it happen in all browsers
> >>
> >> - Can you get something simple to work like this
> >> ExternalInterface.call("alert('TEST')");
> >>
> >> -Can you post the code?
> >>
> >
> >
>




Re: [flexcoders] Re: ExternalInterface erros

2009-01-12 Thread Ralf Bokelberg
Why do you want to use JSON? You can pass in plain objects instead, e.g.

ExternalInterface.call("someJSMethod", { a: 1, b: { c: true, d: "hello"} } );

Ralf.

On Mon, Jan 12, 2009 at 7:55 PM, flexaustin  wrote:
> I can't really post the code. The issue is either I think is either
> one of two things, but I can't seem to resolve either of them.
>
> #1. I am passing data to a javascript function in json format, which
> contains escaped " & \.
>
> #2. This is the issue.
> http://joshblog.net/2008/01/03/flash-player-externalinterface-variable-name-bug/
> On this one I tried putting my function call in '' to as this blog
> post suggests, but it didn't help.
>
> The JSONENcoder is escaping the " and \ on the flex/actionscript side,
> but when it is getting passed to the javascript file I don't think the
> javascript file is understanding the escaped items. I am not a JS guy
> so I don't know if JS/Broswer knows about escaped characters?
>
> TIA, J
>
> --- In flexcoders@yahoogroups.com, "Anthony DeBonis"  wrote:
>>
>> -What browser are you using - or does it happen in all browsers
>>
>> - Can you get something simple to work like this
>> ExternalInterface.call("alert('TEST')");
>>
>> -Can you post the code?
>>
>
> 


[flexcoders] Re: ExternalInterface erros

2009-01-12 Thread flexaustin
I can't really post the code.  The issue is either I think is either
one of two things, but I can't seem to resolve either of them.

#1. I am passing data to a javascript function in json format, which
contains escaped " & \.

#2. This is the issue. 
http://joshblog.net/2008/01/03/flash-player-externalinterface-variable-name-bug/
 On this one I tried putting my function call in '' to as this blog
post suggests, but it didn't help.

The JSONENcoder is escaping the " and \ on the flex/actionscript side,
but when it is getting passed to the javascript file I don't think the
javascript file is understanding the escaped items.  I am not a JS guy
so I don't know if JS/Broswer knows about escaped characters?


TIA, J

--- In flexcoders@yahoogroups.com, "Anthony DeBonis"  wrote:
>
> -What browser are you using - or does it happen in all browsers
> 
> - Can you get something simple to work like this
> ExternalInterface.call("alert('TEST')");  
> 
> -Can you post the code?
>




[flexcoders] Re: ExternalInterface erros

2009-01-12 Thread Anthony DeBonis
-What browser are you using - or does it happen in all browsers

- Can you get something simple to work like this
ExternalInterface.call("alert('TEST')");

-Can you post the code?