View Full Version : Function Not Setting Properly

12-19-2005, 04:00 PM
I have a slight confusion with this function: I can get the selected label of the drop down list component to show in a text field. However, if I try to load in an external SWF from this drop down list, it doesn't work. Basically, when I select networking, the parent container file needs to load the networking SWF file.

Here's the function:

// set up handler for combobox
function setDepartments(evt:Object) {
if (evt.target.selectedIndex > 0) {
myList.addEventListener("change", setDepartments);

The bolded part is giving me fits. It works as mentioned previously when selecting the label of the drop down and showing in a text field, not when loading an external SWF file. myList is the name of the combo box.

Here's the fla if that will help: