0 Replies Latest reply on Jun 29, 2009 7:47 AM by rwark

    Can a remote object be called in a preloader?


      Hi everyone,


      I'm trying to make a remoteObject call in a custom preloader (in ActionScript) and all it does is fail. I know the code for the remote call works, as I use it in other places. This is what I have:




      public function Preloader() {
         svc.source = "UserManagement";
         svc.addEventListener(FaultEvent.FAULT, fault);
         svc.getOperation('logged').addEventListener(ResultEvent.RESULT, loggedResult);


      private function loggedResult(event:ResultEvent):void {

         if (event.result.result != "yes") {
            navigateToURL(new URLRequest("index.html"), '_self');

      private function fault(event:FaultEvent):void {

         navigateToURL(new URLRequest("indexx.html"), '_self');



      The only thing that happens is the call to the fault handler. I'm using this exact code in other places (like on the creationComplete event of other modules) and it works fine. This would normally be acceptable BUT I'm checking to make sure users are logged in to the system before displaying the module and doing so on the creationComplete means they can see/use the module until it comes back and I don't want this.


      Any suggestions?