[swx] multiple SWX instances in actionscript

Martin de Witte martindewitte at gmail.com
Mon Jan 7 12:17:41 PST 2008


hi everyone,

I think (but not sure) I have the same problem. I use different SWF's
with SWX to get data from Flickr, IMDB and Youtube into one Flash
framework. Loading one single SWF at a time works like a charm but as
soon as I interupt the loading of a call none of the SWX instances
won't work until I refresh the framework. To demonstrate you can visit
my site at http://www.martin.dewitte.nl and hit the
Youtube/Flickr/IMDB button and before all thumbs are loaded press
another option. You'll see it stops completly...

I also tested Aral's Flickr (flickr_arals_pics.swf) as well changing
class and function names but it gives same result

Is there anything to stop the call?

thanks in advance,

Martin de Witte

http://martin.dewitte.nl
martindewitte at gmail.com

On Jan 1, 2008 6:53 PM, Aidann Bowley <aidann at ukgateway.net> wrote:
> Hi there and happy new year!
>
> Nice Flash Twitter - did you get it working the way you wanted?
>
> I'm guessing that your repeated calls get overwritten. Have you tried
> creating a new instance of the class?, e.g.
>
> function flickrSWX(){
>      var myFlickrSwx = new SWX();
>      myFlickrSwx.gateway = "http://swxformat.org/php/swx.php";
>      myFlickrSwx.encoding = "POST";
>      var callParameters:Object =
>         {
>          serviceClass: "Flickr",
>          method: "photosSearch",
>          args: ["","","test"],
>          result: [this, flickrCallback]
>          }
>     myFlickrSwx.call(callParameters);
> }
> function twitterSWX(){
>      var myTwitterSwx = new SWX();
>      myTwitterSwx.gateway = "http://swxformat.org/php/swx.php";
>      myTwitterSwx.encoding = "POST";
>      var callParameters:Object =
>          {
>           serviceClass: "Twitter",
>           method: "getNumFriendsUpdates",
>           args: ["benniejolink", 1],
>           result: [this, twitterCallback]
>          }
>      myTwitterSwx.call(callParameters);
> }
> function flickrCallback(event:Object){
>         //do flickr stuff
>         var flickrParameters:Object ={
>             //etc
>         }
>         //call twitterSWX
>         twitterSWX(flickrParameters);
> }
> function twitterCallback(event:Object){
>     //do twitter stuff
> }
>
> //init
> flickrSWX();
>
> Cheerio for now,
>
> Aidann
>
> ----- Original Message -----
> From: "Bennie Jolink" <benni.jolink at gmail.com>
> To: <swx at osflash.org>
> Sent: Saturday, December 29, 2007 7:34 AM
> Subject: [swx] multiple SWX instances in actionscript
>
>
> > hello all,
> >
> > I'm working on a flash twitter app: www.eerkmans.nl/eurosonic.
> >
> > I'm having trouble with actionscript instances of the swx class. When I
> > have
> > a single instance (see the actionscript pasted below) everything runs
> > fine,
> > but when this function gets called more than once at the same time,
> > everything stops working. I want to make a flickr call and a twitter call
> > at
> > approximately the same time.
> >
> >        var mySwx = new SWX();
> >        mySwx.gateway = "http://swxformat.org/php/swx.php";
> >        mySwx.encoding = "POST";
> >
> >        var callParameters:Object =
> >        {
> >            serviceClass: "Flickr",
> >            method: "photosSearch",
> >            args: ["","","test"],
> >            result: [this, flickrCallback]
> >        }
> >        mySwx.call(callParameters);
> >
>
>
>
> > _______________________________________________
> > swx mailing list
> > swx at osflash.org
> > http://osflash.org/mailman/listinfo/swx_osflash.org
> >
>
>
>
> _______________________________________________
> swx mailing list
> swx at osflash.org
> http://osflash.org/mailman/listinfo/swx_osflash.org
>



More information about the swx mailing list