[swx] Problem sending data: [object Object]

Joe L flashdev at itstorm.com
Wed Jan 16 05:09:33 PST 2008


Hi Ben,

Thanks for your reply.
Actually, I'm using Wireshark to sniff what's being sent - that's how I know
that the data is missing from the request.
And I've used trace() to verify that the data object passed as a parameter
to "_root.senddata()" actually does contain the info I want to submit
- so I'm thinking perhaps it's a configuration problem? Maybe SWX requires
specific options to be set when exporting to SWF? (I'm using Flash Player 8
+ ActionScript 2.0 now).

Oh, I also have this in the code:
_root.elementi.Formform.dataHolder.serviceClass = "ServiceName";
_root.elementi.Formform.dataHolder.method = "sendMail";
_root.elementi.Formform.dataHolder.debug = false;

Any ideas?

Best regards,

JL

Ben wrote:
> Hi Joe,
>
> A bit hard to tell without further info on the application, but if you
> are trying to trace dataHolder.args, according to the parameter
> (data:Object), dataHolder.args should trace as an array ([ ]) containing
> an Object (data), which should display as [object Object]... i think.
> You could try using the flash debugger and put a break point in the
> function to analyse what's being passed to the function.
>
> Alternatively if you want to "spy" on what is being sent and retrieved
> through the swx gateway, I'd recommend you use something like Charles
> (search Charles HTTP proxy on google), it will show you what's being
> transmitted behind the scene (between your flash app and the server). I
> use it all the time to troubleshoot, it works really well.
>
> Hope this helps.
>
> Good luck ;)
>
> Ben
>
> Joe L wrote:
> > Hi,
> >
> > I'm new to SWX - I just "inherited" a project which uses it, and I'm
> > beginning to like the idea behind it.
> > However, I have a problem sending data to the server. When I do the
> > following:
> >
> > _root.senddata = function(data:Object) {
> >     _root.elementi.Formform.dataHolder.args = [data];
> >     SWX.prepare(_root.elementi.Formform.dataHolder);
> >     _root.elementi.Formform.dataHolder.loadMovie("
> > http://localhost/swx/php/swx.php","POST");
> > };
> >
> > the value of the "args" parameter in the request is literally "[object
> > Object]", instead of the contents of the 'data' object.
> > I'm sure I'm missing something completely trivial, but could some
> > please point me in the right direction?
> >
> > Many thanks in advance,
> >
> > JL
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/swx_osflash.org/attachments/20080116/c2d4de16/attachment.html 


More information about the swx mailing list