Change this: MyPendingCallObject = myWebServiceObject.getCurrentSong();
To this: var mySong:String = "F'ing Hostile"; var artist:String = "Pantera"; MyPendingCallObject = myWebServiceObject.getCurrentSong(mySong, artist); The beauty is, it's code; you don't even know you're calling it webservice... it's just a method that takes longer than a millisecond to excute, thus you need a result function... ah, I love Flex. ----- Original Message ----- From: "huhgawz" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Thursday, November 10, 2005 9:01 PM Subject: [flexcoders] Re: WebServices via ActionScript It works excelent!!!.... But how can i set the webservice params programatically? I mean, if for example getCurrentSong(p1,p2) need a pair of parameters or more....How can i set them via ActionScript? --- In [email protected], "JesterXL" <[EMAIL PROTECTED]> wrote: > > Starting a new thread since we hijacked the other one. > > I tested this and it works in Flex 1.5 and Flash 8. > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" > initialize="getFunky()"> > <mx:Script> > <![CDATA[ > > import mx.services.WebService; > import mx.services.PendingCall; > > var myWebServiceObject:WebService; > var MyPendingCallObject:PendingCall; > > > public var debug_str:String = ""; > > function getFunky() > { > d("WebService: " + WebService); > var theURL = "http://radio.tapper.net/artist.cfc?wsdl"; > myWebServiceObject = new WebService(theURL); > MyPendingCallObject = myWebServiceObject.getCurrentSong(); > d("Made call..."); > MyPendingCallObject.onResult = function(result) > { > mx.core.Application.application.d("result: " + result); > for(var p in result) > { > mx.core.Application.application.d(p + ": " + result[p]); > } > } > MyPendingCallObject.onFault = function(fault) > { > mx.core.Application.application.d("fault: " + fault); > for(var p in fault) > { > mx.core.Application.application.d(p + ": " + fault[p]); > } > } > } > > function d(o) > { > debug_str += o + "\n"; > } > > > ]]> > </mx:Script> > > <mx:TextArea text="{debug_str}" width="400" height="300" /> > </mx:Application> > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links ------------------------ Yahoo! Groups Sponsor --------------------~--> Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

