Null result

2 views
Skip to first unread message

jk2l

unread,
Nov 25, 2009, 4:30:04 PM11/25/09
to SWX: The Native Data Format for Adobe Flash
Hi,

I have installed SWX into the server, but when I try to get result off
it I received null result. Can someone please help me solve this
mystery? (I am using SWX 2.0)

Name: Result
Type: null
Length = n/a
Value = undefined

Ben Lagoutte

unread,
Nov 25, 2009, 5:28:27 PM11/25/09
to swx-f...@googlegroups.com
Can you post some sample of your code, and the address of the server.
It's hard to tell with just that information...

Ben
> --
>
> You received this message because you are subscribed to the Google
> Groups "SWX: The Native Data Format for Adobe Flash" group.
> To post to this group, send email to swx-f...@googlegroups.com.
> To unsubscribe from this group, send email to swx-format+...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/swx-format?hl=en
> .
>
>

jk2l

unread,
Nov 25, 2009, 8:47:15 PM11/25/09
to SWX: The Native Data Format for Adobe Flash
let say those lines of code

loader2.serviceClass = "Twitter";
loader2.method = "search";
loader2.args = '["@hamrltd"]';
loader2.debug = true;
loader2.loadMovie("http://dev.hamr.co.nz:8001/php/swx.php","GET");
//loader2.loadMovie("http://www.swxformat.org/php/swx.php", "GET");

I can only receive a null result from my server, but if I used
swxformat.org one instead it can get all the information. also I
believe it is the SWX problem in server side because the data analyzer
showed that I received null

Ben Lagoutte

unread,
Nov 25, 2009, 9:03:04 PM11/25/09
to swx-f...@googlegroups.com
Are you doing a cross domain call from else where?

Ben

jk2l

unread,
Nov 25, 2009, 9:08:29 PM11/25/09
to SWX: The Native Data Format for Adobe Flash
what do you mean?

Ben Lagoutte

unread,
Nov 25, 2009, 9:11:49 PM11/25/09
to swx-f...@googlegroups.com
Are you calling this from a separate domain? from the flash IDE?

Ben

jk2l

unread,
Nov 26, 2009, 5:09:03 PM11/26/09
to SWX: The Native Data Format for Adobe Flash
My flash is running on www.hamr.co.nz (but the result i post above
obtained when i run flash as localhost). the SWX php is hosted under
dev.hamr.co.nz (it is on different ip/server)

i hope this answer your question.

Ben Lagoutte

unread,
Nov 26, 2009, 5:35:52 PM11/26/09
to swx-f...@googlegroups.com
You probably need to add a crossdomain file (check google for
crossdomain details).

And you also need to explicitly tell swx that you're doing some cross
domain:

http://code.google.com/p/swx-format/wiki/Using_SWX#Cross_domain_access

Ben
>>>>>>> for...@googlegroups.com.

Jacky Leung

unread,
Nov 26, 2009, 6:37:39 PM11/26/09
to swx-f...@googlegroups.com
is that different to System.security.allowDomain("*")?, because I have that
line at top of the file.

regards
Jacky

--------------------------------------------------
From: "Ben Lagoutte" <ben.la...@gozer.com.au>
Sent: Friday, November 27, 2009 11:35 AM
To: <swx-f...@googlegroups.com>
Subject: Re: [swx-format] Re: Null result

Ben Lagoutte

unread,
Nov 26, 2009, 7:14:27 PM11/26/09
to swx-f...@googlegroups.com
Yes, you'll need to tell swx as well - this is necessary because some
crossdomain related code needs to be embedded in the response by the
server.

Ben

jk2l

unread,
Nov 26, 2009, 8:10:52 PM11/26/09
to SWX: The Native Data Format for Adobe Flash
Sorry I am new to this flash thing. How can I load the SWX library
into my compiler? I am using Adobe Flash CS4. When I tried to go with
SWX way instead of loadMovie, i encounter the "The class or interface
'org.swxformat.SWX' could not be loaded." error.

regards
Jacky

On Nov 27, 1:14 pm, Ben Lagoutte <ben.lagou...@gozer.com.au> wrote:
> Yes, you'll need to tell swx as well - this is necessary because some  
> crossdomain related code needs to be embedded in the response by the  
> server.
>
> Ben
>
> On Nov 27, 2009, at 10:37 AM, Jacky Leung wrote:
>
> > is that different to System.security.allowDomain("*")?, because I  
> > have that
> > line at top of the file.
>
> > regards
> > Jacky
>
> > --------------------------------------------------
> > From: "Ben Lagoutte" <ben.lagou...@gozer.com.au>
> > Sent: Friday, November 27, 2009 11:35 AM
> > To: <swx-f...@googlegroups.com>
> > Subject: Re: [swx-format] Re: Null result
>
> >> You probably need to add a crossdomain file (check google for
> >> crossdomain details).
>
> >> And you also need to explicitly tell swx that you're doing some cross
> >> domain:
>
> >>http://code.google.com/p/swx-format/wiki/
> >> Using_SWX#Cross_domain_access
>
> >> Ben
>
> >> On Nov 27, 2009, at 9:09 AM, jk2l wrote:
>
> >>> My flash is running onwww.hamr.co.nz(but the result i post above

Ben Lagoutte

unread,
Nov 26, 2009, 9:45:10 PM11/26/09
to swx-f...@googlegroups.com
You need to copy the org folder in Library/v2/AS3 from the downloaded zip at the root of your flash project (same folder as your fla file).

See the wiki for details:



Ben

jk2l

unread,
Nov 26, 2009, 10:34:42 PM11/26/09
to SWX: The Native Data Format for Adobe Flash
ok, i implemented under the methods shown in that wiki still not
working for my server (but it worked for swxformat.org)

import org.swxformat.SWX;

var swx:SWX = new SWX();
swx.gateway = gateway;
swx.encoding = encoding;
swx.timeout = 30;
swx.debug = true;

swx.progressHandler = progressHandler;
swx.timeoutHandler = timeoutHandler;
swx.faultHandler = faultHandler;

swx.initializeCrossDomain(stage.loaderInfo.url);
> >>>>> My flash is running onwww.hamr.co.nz(butthe result i post above
> >>>>> For more options, visit this group at
> >>>>>http://groups.google.com/group/swx-format?hl=en
> >>>>> .
>
> >>>> --
>
> >>>> You received this message because you are subscribed to the Google
> >>>> Groups
> >>>> "SWX: The Native Data Format for Adobe Flash" group.
> >>>> To post to this group, send email to swx-f...@googlegroups.com.
> >>>> To unsubscribe from this group, send email to
> >>>> swx-format+...@googlegroups.com.
> >>>> For more options, visit this group at
> >>>>http://groups.google.com/group/swx-format?hl=en.
>
> >>> --
>
> >>> You received this message because you are subscribed to the Google
> >>> Groups "SWX: The Native Data Format for Adobe Flash" group.
> >>> To post to this group, send email to swx-f...@googlegroups.com.
> >>> To unsubscribe from this group, send email to swx-format+...@googlegroups.com
> >>> .
> >>> For more options, visit this group athttp://groups.google.com/group/swx-format?hl=en
> >>> .
>
> > --
>
> > You received this message because you are subscribed to the Google  
> > Groups "SWX: The Native Data Format for Adobe Flash" group.
> > To post to this group, send email to swx-f...@googlegroups.com.
> > To unsubscribe from this group, send email to swx-format+...@googlegroups.com

Ben Lagoutte

unread,
Nov 26, 2009, 10:37:47 PM11/26/09
to swx-f...@googlegroups.com
Does the fault handler trigger ?

Ben

Ben Lagoutte

unread,
Nov 26, 2009, 10:38:53 PM11/26/09
to swx-f...@googlegroups.com
Have you added the cross domain policy file to your server?

ben

On Nov 27, 2009, at 2:34 PM, jk2l wrote:

jk2l

unread,
Nov 26, 2009, 10:39:18 PM11/26/09
to SWX: The Native Data Format for Adobe Flash
SWX LoadManager INFO: Initialized.
ExternalAsset.load() info: Sending data using GET encoding.
SWX.prepare: _level0.SWXLoadManagerClip.holder0.innerHolder
ExternalAsset loaded: _level0.SWXLoadManagerClip.holder0
ExternalAsset.load() info: Sending data using GET encoding.
SWX.prepare: _level0.SWXLoadManagerClip.holder1.innerHolder
ExternalAsset loaded: _level0.SWXLoadManagerClip.holder1

This is all the info thrown into output, nothing from fault handler (i
use the same methods from wiki)
> >>>>> My flash is running onwww.hamr.co.nz(butthe result i post above
> >>>>> For more options, visit this group at
> >>>>>http://groups.google.com/group/swx-format?hl=en
> >>>>> .
>
> >>>> --
>
> >>>> You received this message because you are subscribed to the Google
> >>>> Groups
> >>>> "SWX: The Native Data Format for Adobe Flash" group.
> >>>> To post to this group, send email to swx-f...@googlegroups.com.
> >>>> To unsubscribe from this group, send email to
> >>>> swx-format+...@googlegroups.com.
> >>>> For more options, visit this group at
> >>>>http://groups.google.com/group/swx-format?hl=en.
>
> >>> --
>
> >>> You received this message because you are subscribed to the Google
> >>> Groups "SWX: The Native Data Format for Adobe Flash" group.
> >>> To post to this group, send email to swx-f...@googlegroups.com.
> >>> To unsubscribe from this group, send email to swx-format+...@googlegroups.com
> >>> .
> >>> For more options, visit this group athttp://groups.google.com/group/swx-format?hl=en
> >>> .
>
> > --
>
> > You received this message because you are subscribed to the Google  
> > Groups "SWX: The Native Data Format for Adobe Flash" group.
> > To post to this group, send email to swx-f...@googlegroups.com.
> > To unsubscribe from this group, send email to swx-format+...@googlegroups.com

jk2l

unread,
Nov 26, 2009, 10:40:29 PM11/26/09
to SWX: The Native Data Format for Adobe Flash
as far as i remember, i haven't done something like that. which file
are u refering to?
> >>>>>>> My flash is running onwww.hamr.co.nz(buttheresult i post above

jk2l

unread,
Nov 26, 2009, 10:41:18 PM11/26/09
to SWX: The Native Data Format for Adobe Flash
<cross-domain-policy>

<site-control permitted-cross-domain-policies="all">

<allow-access-from domain="*">

</allow-access-from>

<allow-http-request-headers-from domain="*" headers="*">

</allow-http-request-headers-from>

</site-control>

</cross-domain-policy>


this is the content of my crossdomain.xml
> >>>>>>> My flash is running onwww.hamr.co.nz(buttheresult i post above

Ben Lagoutte

unread,
Nov 26, 2009, 10:45:32 PM11/26/09
to swx-f...@googlegroups.com

Ben Lagoutte

unread,
Nov 26, 2009, 10:47:30 PM11/26/09
to swx-f...@googlegroups.com
What happens if you change the encoding from get to post before the call?

swx.encoding: "POST";
Ben

jk2l

unread,
Nov 26, 2009, 11:27:40 PM11/26/09
to SWX: The Native Data Format for Adobe Flash
it is the same :(
> >>>>>>> My flash is running onwww.hamr.co.nz(buttheresult i post above
> > To unsubscribe from this group, send email to swx-format+...@googlegroups.com

Ben Lagoutte

unread,
Dec 17, 2009, 1:26:48 AM12/17/09
to swx-f...@googlegroups.com
Running out of ideas.. Try sending you fla file through so I can check
it out.

I'm on leave for 2 weeks starting... in about 10 minutes, so I can
only check it out when I get back...

maybe someone else on the list can help you out in the mean time..

Good luck

Ben
Reply all
Reply to author
Forward
0 new messages