Basic question I know, I know...
but how can I make a combobox work in flash mx 2004?
If a user chooses something, the movie should go to a specified frame in a specified scene...
Set your labels and data in the component inspector. Apply the following code to the first frame of the timeline that the combobox is on. Give the combobox an instance name, for my example the name is "myCombo".
Code:
comboListener = new Object();
comboListener.change = function(evt){
trace(evt.target.selectedItem.data); //evt.target.selectedItem.label will give you the label value.
}
myCombo.addEventListener("change", comboListener);
Let me know if you need any help modifying it to work for your needs.
Hope it helps.
Wow JT that almost looked like you knew what you were doing!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.