2 Replies Latest reply on Mar 22, 2008 8:24 AM by novembers

    cannot convert mx.utils::ObjectProxy to User

      Hello!

      I get this error message "cannot convert mx.utils::ObjectProxy####### to User".

      here is the code

      private function checkLoginHandler(evt:ResultEvent):void {
      // logged player or null
      loggedUser = User(evt.result);
      if (loggedUser.username != null) {

      currentState="Logged_in";

      }

      else {
      mx.controls.Alert.show("Wrong username/password);
      }
      }


      I dont know what Im doing wrong. I have this example and I kind a reuse it and make it as my own. Im doing the same things but still it doesnt work. I wonder if you could know where is the problem?