Hi Everyone.I have a (I’m guessing) very simple problem.
I have a combo box, and when a item from the drop down is selected I want to jump to a frame label on the timeline…
Thats it.
I dont know how to go about setting it up.
I think it must be something Im not doing within the component inspector…
Ive given the combo box the instance name of myComboBox
here is the code I’m using:
myComboBoxListener = new Object();
myComboBoxListener.change = function(eventObj)
{
var eventSource = eventObj.target;
var theSelectedItem = eventSource.target.selectedItem;
var theSelectedItemLabel = theSelectedItem.label;
trace ( "You selected "+theSelectedItemLabel+".");
switch (theSelectedItemLabel) {
case "Premier League":
gotoAndStop("Premier League");
break;
case "League 1":
movies.gotoAndStop("League 1");
break;
case "League 2":
movies.gotoAndStop("League 2");
break;
case "League 3":
movies.gotoAndStop("League 3");
break;
case "League 4":
movies.gotoAndStop("League 4");
break;
case "League 5":
movies.gotoAndStop("League 5");
break;
}
}
myComboBox.addEventListener (“change”, myComboBoxListener);
Any help would be GREATLY appreciated!
Thanks,
Rob