Here is a from memory, untested example:
private var _myHTTPService:HTTPService; //no ids when using AS, so use
this instance var to reference the object = new HTTPService;
private function init():void
_myHTTPService.url = myURL; //NOT a binding, but that is probably not
important
_myHTTPService.method = "GET";
_myHTTPService.resultFormat = "e4x"; //I refuse to use "object"
var oRequest:Object = {mode:mode,mode2:mode2,catid:catid};
... then going the rest of the way
var atCall:AsyncToken = _myHTTPService.send(oRequest);
atCall.callid = "whatever"
Now, I would suggest you do the initialization of the _myHTTPService
object once, in an init function, and then set the properties that
change, like the url and the request object, just before you invoke each
send.
Tracy
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Nate Beck
Sent: Monday, September 08, 2008 11:06 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] as3 code for the MXML
Create a really simple Flex project with just that code in it, and then
use the "-keep-generated-actionscript" compiler flag.
See
http://weblog.mrinalwadhwa.com/2007/07/09/flex-tip-of-the-day-keep-gener
ated-actionscript/
<http://weblog.mrinalwadhwa.com/2007/07/09/flex-tip-of-the-day-keep-gene
rated-actionscript/>
Cheers,
Nate
On Mon, Sep 8, 2008 at 7:30 AM, markflex2007 <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:
Hi,
I want to use AS 3 do the same thing with following MXML code:
{mode}
{mode2}
{catid}
please give me a hit .Thanks for your help
MK