<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import mx.controls.Alert;
public function checkPassword():void
{
if(password.text.length < 1)
Alert.show("Missing Password!");
else
Alert.show("Looks Good!");
}
</mx:Script>
<mx:TextInput id="password" />
<mx:Button label="Check Password" click="checkPassword()" />
</mx:Application>
|