Thanks!!

 

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jmfillman
Sent: Friday, February 16, 2007 1:01 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Wet Behind the ears

 

Wally,

You are looking for the close event on the ComboBox. Take a look at 
the code below.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> " 
layout="absolute">
<mx:states>
<mx:State name="State2">
<mx:AddChild position="lastChild">
<mx:Label x="234" y="39" 
text="State2" width="167" fontWeight="bold" textAlign="center" 
fontSize="20"/>
</mx:AddChild>
<mx:RemoveChild target="{stateC}"/>
</mx:State>
</mx:states>
<mx:Script>
<![CDATA[
public function changeState():void {
if (stateCB.selectedItem.data==2){
currentState='State2';
}
}
]]>
</mx:Script> 
<mx:ComboBox id="stateCB" x="73" y="64" close="changeState()">
<mx:ArrayCollection>
<mx:Object label="--" data="1"/>
<mx:Object label="State 2" data="2"/>
</mx:ArrayCollection>

</mx:ComboBox>

</mx:Application>

 

Reply via email to