http://livedocs.adobe.com/flex/2/langref/mx/rpc/http/HTTPService.html#send()
check out the send method, it takes 1 argument which could be an object or xml of name-value pairs for arguments. something like this maybe (not tested) private var _uName:String; private var _pwd:String; // Going to build the public function LoginConfirmSubmit():void { import mx.controls.Alert; import com.adobe.crypto.SHA256; _uName = userName.text; _pwd = password.text; _pwd = SHA256.hash(_pwd); ConfirmLogin.send(); ConfirmLogin.send({uName:_uName, uPass: _pwd}); } hth, d. On Fri, Apr 25, 2008 at 1:11 PM, timgerr <[EMAIL PROTECTED]> wrote: > Hey all, still learning here. I am wondering how to pass actionscript > variables into flex, here is some code: > <?xml version="1.0" encoding="utf-8"?> > <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" > width="400" height="300" title="Login"> > <mx:Script> > <![CDATA[ > private var _uName:String; > private var _pwd:String; > // Going to build the > public function LoginConfirmSubmit():void > { > import mx.controls.Alert; > import com.adobe.crypto.SHA256; > _uName = userName.text; > _pwd = password.text; > _pwd = SHA256.hash(_pwd); > > } > public function SendLoginInformation(uName:String, > encypPassd:String):void > { > ConfirmLogin.send(); > } > ]]> > </mx:Script> > <mx:HTTPService id="ConfirmLogin" url="http://127.0.0.1/login.php" > useProxy="false" > method="POST" resultFormat="text" result="ParseJSON(event)"> > <mx:request xmlns=""> > <username> _uName </username> > <password> _pwd</password> > </mx:request> > </mx:HTTPService> > <mx:Label x="30" y="26" text="User Name"/> > <mx:Label x="30" y="62" text="Password"/> > <mx:TextInput x="127" y="22" themeColor="#CD12E9" id="userName"/> > <mx:TextInput x="127" y="58" themeColor="#CD12E9" id="password"/> > <mx:Button x="127" y="138" label="Login" click="LoginConfirmSubmit()" > themeColor="#CD12E9"/> > <mx:LinkButton x="30" y="189" label="Register" > click="parentDocument.ChangeStateRegister()" themeColor="#CD12E9"/> > > </mx:Panel> > > How do you pass _pwd and _uName from the to the SendLoginInformation > method to the the flex HTTPService request? > > Thanks, > timgerr > > >