header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
Shridhar Kulkarni
Points:0
Posts:0

3/24/2011 10:33:45 PM

Title: ComboBox Event


hello
I am having combobox in my application, and on change i write some method in which i have code of visibility of other component.

Now the problem is when i only open the combo box and selects nothing then it will nt call that method so the code will not work.

So i want some help on which event i shud call this function. as I called it on close its giving me error

Please Help..



1
venky
Points: 0
Posts:0
3/25/2011 3:12:09 AM



First my question is, why do u even want to trigger an event when the user doesn't change the combo box data??

and suppose initially first data is already selected and ur event doesn't get trigerred do the following..

1)Put --Select-- as ur first data in the data provider and give its "id" field as "". and other data in the combobox has its valid "id". so u can trigger the event when the user changes the dropdown.

2
Michael
Points: 250
Posts:0
3/26/2011 11:05:39 AM



very unusual case but this code with close event handler for combobox in flex will work


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="1024" minHeight="768">
	<mx:Script>
		<![CDATA[
			import mx.events.DropdownEvent;

			protected function combobox1_closeHandler(event:DropdownEvent):void
			{
				trace( event.currentTarget.selectedIndex)
			}
		]]>
	</mx:Script>
	<mx:ComboBox x="113" y="69" close="combobox1_closeHandler(event)">
		<mx:dataProvider>
			<mx:Array>
				<mx:String>A</mx:String>
				<mx:String>B</mx:String>
				<mx:String>C</mx:String>
				<mx:String>D</mx:String>
			</mx:Array>
		</mx:dataProvider>
	</mx:ComboBox>
</mx:Application>



3
Rex
Points: 1280
Posts:0
3/26/2011 11:53:53 AM



close event should work whats the error


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 3+7 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions