-
I'm trying to use a combo box within the mx components to create a single navigation element. Similar to the use of the form element in HTML. I tried to play with a change handler, but I'm not having any luck.
How can I do this? What is the AS syntax?
Thank You for your help.
-
Senior Member
Hi,
Are you wanting to do something when an item is selected from the combo box or ..
not quite sure
Chi
-
Yes, I want to be able to select something from the combo box and when the item is selected I want an action to start. Something like gotoAndStop(3) or loadMovie ... or whatever is tied to the item in the combo box list.
Thank you for your quick response!
-
Senior Member
Okie doke
Say your combo box was called myCombo, it has two options, namely One and Two, and they have that value. If you make a function
Code:
function onComboChange() {
selected = myCombo.getValue();
switch(selected) {
case "One":
//do some code as One has been chosen
break;
case "Two":
//do some code because Two has been chosen
break;
}
}
Then you just have to put onComboChange as your Change Handler
Chi
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|