tags:

views:

28

answers:

1

I have a MXML file and ActionScript Class...

Now i have a component textInput in my MXML, how would i call this in my ActionScript class.

<mx:TextInput styleName="loginTextInput" id="username" x="160" y="161"/>

ActionScript class..

package myClasses
{

    import mx.controls.Alert;
    import mx.events.ValidationResultEvent; 
    public class CheckLogin
    {
     public function CheckLogin()
     {
     }

     private function loginCheck():void {
            // I need to call the TextInput down here.
     Alert.show("loginCheck Done");
     }


    }
}
A: 

You can call it by using the 'id' of the mxml-component... so for example username.text = "whatever";

Ypmits