PDA

View Full Version : checkbox


fulltimelearner
03-20-2009, 03:12 AM
hye....
i'm newbie here.i want to ask,i'm not sure if this can be done.
i have a checkbox and a user input text .when a user input a text,and click the checkbox,it will search the text specified.

can this be done?anybody please help me....

thanks in advance

mastermind81
03-20-2009, 11:47 AM
hye....
i'm newbie here.i want to ask,i'm not sure if this can be done.
i have a checkbox and a user input text .when a user input a text,and click the checkbox,it will search the text specified.

can this be done?anybody please help me....

thanks in advance

<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
>
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function OnCheckBox_Change():void{
if ( this.chkSearch.selected ){
Alert.show("Searching :"+this.txtInputText.text);
}
}
]]>
</mx:Script>
<mx:CheckBox label="Search" id="chkSearch" change="OnCheckBox_Change()"/>
<mx:TextInput id="txtInputText"/>
</mx:Application>