Well, I don't use ColdFusion; I use Weborb for PHP. That said, this is how I would do it with WebOrb for PHP (You should be able to extrapolate for ColdFusion):
Application: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="showLogin()"> <mx:Script> <![CDATA[ import mx.managers.PopUpManager; import mx.core.IFlexDisplayObject; import LoginWindow; private function showLogin():void { // Create a non-modal TitleWindow container. var loginWindow:IFlexDisplayObject = PopUpManager.createPopUp(this, LoginWindow, false); PopUpManager.centerPopUp(loginWindow); } ]]> </mx:Script> </mx:Application> LoginWindow.mxml: <?xml version="1.0"?> <!-- containers\layouts\myComponents\MyLoginForm.mxml --> <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" initialize="init()"> <mx:Script> <![CDATA[ import mx.managers.PopUpManager; import mx.controls.Alert; import mx.events.FlexEvent; import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; import mx.rpc.remoting.RemoteObject; private var loginService:RemoteObject; private function init():void { loginService = new RemoteObject("loginServiceDestination"); loginService.requestTimeout = 30; loginService.processLogin.addEventListener(ResultEvent.RESULT, processLoginHandler); loginService.addEventListener(FaultEvent.FAULT, faultHandler); } private function processLogin():void { loginService.processLogin(username.text, password.text); } private function processLoginHandler(event:ResultEvent):void { if(event.result as String == "Success!") { PopUpManager.removePopUp(this); } else { Alert.show("Login Failed!"); username.text = ""; password.text = ""; } } private function faultHandler(fault:FaultEvent):void { switch(fault.fault.faultCode.toString()) { case "Client.Error.RequestTimeout": Alert.show("The server is not responding. Please check that you are connected and the server is running.", "Server Timeout"); break; default: Alert.show(fault.fault.faultString, fault.fault.faultCode.toString()); break; } } ]]> </mx:Script> <mx:Form> <mx:FormItem label="User Name"> <mx:TextInput id="username" width="100%"/> </mx:FormItem> <mx:FormItem label="Password"> <mx:TextInput id="password" displayAsPassword="true" width="100%"/> </mx:FormItem> </mx:Form> <mx:HBox> <mx:Button click="processLogin();" label="OK"/> <mx:Button label="Cancel" click="PopUpManager.removePopUp(this);"/> </mx:HBox> </mx:TitleWindow> You can return whatever you like from your service. In the example above, it is just a string - "Success!" or "Failure". HTH Steve --- In flexcoders@yahoogroups.com, "stinasius" <[EMAIL PROTECTED]> wrote: > > please guys any help!!!! am desperate. >