[swx] Using swx in loaded swf files
Rune Høck Møller
mail at runehock.dk
Mon Dec 10 12:12:05 PST 2007
Hi swx list,
I am creating a flash site where I use the swx php for everything
that is dynamic and I get it from a MySql database.
That all works very well and fast (thanks Aral).
But I need to load the swf's in seperately into a main swf and
display data there. And when I do thatl, the swx returns an error
because it thinks that I am trying to access the "gateway" from my
main swf file. But I need it to access it from the loaded swf "subpage"!
I use a movieclipholder for my external swf :
var holder:MovieClip = contentContainer_mc.createEmptyMovieClip
("contentHolder_mc", this.getNextHighestDepth());
My loaded swf looks like this (and it works when I test it seperately):
import org.swxformat.SWX;
System.useCodepage = true;
status.html = true;
var swx:SWX = new SWX();
swx.gateway = "http://www.uterus.dk/php/swx.php";
swx.encoding = "GET";
swx.debug = true;
swx.timeout = 3;
var callParameters:Object =
{
serviceClass: "news",
method: "getcard",
args: [1],
result: [this, resultHandler],
timeout: [this, timeoutHandler]
}
swx.call(callParameters);
function resultHandler(event:Object)
{
status.text = event.result;
}
function timeoutHandler()
{
status.text = "Call timed out!";
}
Any suggestions to this problem??
Thanks,
Rune
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/swx_osflash.org/attachments/20071210/dd658b64/attachment.html
More information about the swx
mailing list