Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combobox in flash mx 2004

Status
Not open for further replies.

D2C

Programmer
Aug 27, 2001
86
BE
Hi dear helper,

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...

tnx in advance,

cheers,
d2c
 
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!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top