Skip navigation
Currently Being Moderated

Changing to fx

Aug 7, 2012 5:41 PM

Hi

 

Using Flash Builder 4.6 and I changed my code from mx:script to fx:script and now I have a whole new set of problems.

 

Here is my code:

 

<fx:Script>

       <![CDATA[

              private function checkLogin(evt:ResultEvent):void

              {

              if(evt.result.loginsuccess == "yes")

              {

              currentState = "Logged In";

              }

              if(evt.result.loginsuccess == "no")

              {

              mx.controls.Alert.show("Invalid username/password");

              }            

              }

       ]]>

</fx:Script>

 

 

I'm getting the following errors:

"Type not found or was not a compile time constant"

and

"Access of undefined property result"

 

 

Any help would be greatly appreciated.

 

Thanks,

 
Replies
  • Currently Being Moderated
    Aug 7, 2012 11:26 PM   in reply to Captain825

    Which importstatement is used for the ResultEvent-object?

     

    Using import mx.rpc.events.ResultEvent;, your code compiles just fine in my environment.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points