do e.toString()
private function initApp():void{
myString('OK');
}
private function myString(e:String):void{
if('OK' == e.toString()){
trace('here');
}
}----- Original Message ---- From: Jati Putra <[EMAIL PROTECTED]> To: [email protected] Sent: Friday, February 15, 2008 4:07:30 AM Subject: [flexcoders] I got the the value when using "trace", but failed when make a comparison Dear All, Please check this code, what is the problem? AS3 : public function validateLogin( e:String) :void{ trace(e); if('OK' == e){ mx.controls. Alert.show( "OK"); //navigateToURL( tujuan,'_ self'); }else{ mx.controls. Alert.show( "FALSE"); //po.text="Username or Password WRONG"; } } MXML: <mx:HTTPService id="login_srv" url="http:// localhost/ flex/session. php" method="POST" result="validateLog in(String( event.result) )"> <mx:request> <username>{username_checked}</username> <password>{password_checked}</password> </mx:request> </mx:HTTPService> The "trace" value is "OK" but in the if statement the app always show alert in "False". Thanks Looking for last minute shopping deals? Find them fast with Yahoo! Search. ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs

