Tengo el siguiente problema, en si tengo dos problema
1- no me carga los módulos.
2- No se como hacer para dos sesiones, para que me cargue modulo correspondiente OIRS o ADmienitracion.
Les cuento mi historia, lo que estoy asiendo es un sistema con restricciones, en cual ingreso Usuario y Contraseña me envía a la sesión correspondiente (Al modulo correspondiente).
[img]http://l4c.me/fotos/shinodax/sistema/sizes/o[/img]
LES ENVIO EL CODIGO DE LA IMAGEN
Código Flex :
<?xml version="1.0" encoding="utf-8"?> <mx:Application backgroundColor="#a2f1e3" width="100%" height="100%" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" borderColor="#FFFFFF" color="#000000" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#FFFFFF, #FFFFFF]" borderStyle="solid" borderThickness="0" cornerRadius="0" xmlns:Componentes="Componentes.*" alpha="1.0" fontSize="10"> <mx:Style source="estiloentrada.css"/> <mx:Script> <![CDATA[ import Componentes.OtraUnidad; import flash.net.URLRequest; import flash.net.navigateToURL; import mx.controls.Alert; import mx.managers.PopUpManager; var fecha:Date; var sFecha:String; var sHora:String; import mx.rpc.events.ResultEvent; private function cargaModulo(m:ModuleLoader, url:String):void{ m.url=url; m.loadModule(); } public function resultado(event:ResultEvent):void{ var s:String=String(event.result); switch(s){ case "oirs": currentState = "logIN"; cargaModulo(modulos1,"cargarModulos.swf"); break; case "administracion": currentState = "logIN"; cargaModulo(modulos2,"unidadJuridica.swf"); break; case "no": Alert.show("Usuario o contraseña incorrecto. Por favor, intente otra vez."); tusuario.text=""; tpass.text=""; break; } } public function salida():void{ currentState = ""; tusuario.text=""; tpass.text=""; } ]]> </mx:Script> <mx:states> <mx:State name="logIN"> <mx:SetProperty target="{pnMain}" name="width" value="100%"/> <mx:SetProperty target="{pnMain}" name="height" value="100%"/> <mx:RemoveChild target="{cnvLogin}"/> <mx:SetProperty target="{pnMain}" name="title" value="Sistema Conadi"/> <mx:AddChild relativeTo="{pnMain}" position="firstChild" > <mx:VBox width="100%" height="100%"> <mx:ModuleLoader id="modulos1" width="100%" height="100%"/> <mx:ControlBar width="100%" horizontalAlign="right"> <mx:Label text="......."/> <mx:LinkButton label="Salir" click="salida()"/> </mx:ControlBar> </mx:VBox> <mx:VBox width="100%" height="100%"> <mx:ModuleLoader id="modulos2" width="100%" height="100%"/> <mx:ControlBar width="100%" horizontalAlign="right"> <mx:Label text="......."/> <mx:LinkButton label="Salir" click="salida()"/> </mx:ControlBar> </mx:VBox> </mx:AddChild> </mx:State> </mx:states> <mx:RemoteObject id="RO" destination="dest" result="resultado(event)" showBusyCursor="true" fault="Alert.show(event.fault.faultString, 'Error');"> </mx:RemoteObject> <mx:Panel id="pnMain" layout="absolute" resizeEffect="Resize" horizontalCenter="0" verticalCenter="0" title="Acceso Restringido" width="424" height="439" borderStyle="solid" headerColors="#000000, #d9d9d9" color="#0C00FF" backgroundColor="#FFFFFF" borderColor="#FFFFFF" alpha="0.85" backgroundAlpha="1.0"> <mx:Canvas id="cnvLogin" y="1" x="22" height="375" width="379"> <mx:Form x="10" y="263" height="82" width="359" color="#000000"> <mx:FormItem label="Usuario" fontWeight="bold"> <mx:TextInput id="tusuario" color="#000000" width="247" borderColor="#FFFFFF" themeColor="#001EFF"/> </mx:FormItem> <mx:FormItem label="Password" fontWeight="bold"> <mx:TextInput id="tpass" displayAsPassword="true" color="#000000" width="247" themeColor="#001EFF" borderColor="#FFFFFF"/> </mx:FormItem> </mx:Form> <mx:Image x="89" y="0" source="@Embed(source='imagenes/logo.PNG')" width="201" height="262"/> <mx:LinkButton label="ENTRAR" id="baceptar" click="RO.verificarDatosUsuarios(tusuario.text,tpass.text)" fillAlphas="[1.0, 1.0]" fillColors="[#000000, #000000]" color="#000000" borderColor="#E70F0F" width="73" fontSize="10" height="22" alpha="0.45" x="153" y="346"/> </mx:Canvas> </mx:Panel> </mx:Application>
Espero que me puedan ayudar ya que me estoy volviendo loco llevo dias sin saver el error
Gracias espero sus respuestas