I've got the two comboboxes working, but now I'm having trouble getting the user selection to go to the corresponding frame in the timeline. I'm completely clueless when it comes to this, but I just need this bit of code to work. Cheers!
stop();
//Place Main Topics Here:
mainArrLabel = ["Please Select a Category...", "Clean Samples", "Raw Wastewater", "Manufacturing", "Wastewater Treatment", "Industrial Water", "Unique Samples"];
mainArrData = ["", "cleanArray", "rawArray", "manufArray", "wasteArray", "industrialArray", "uniqueArray"];
for (var j = 0; j<mainArrLabel.length; j++) {
main_cb.addItem(mainArrLabel[j], mainArrData[j]);
}
myComboBoxListener = new Object();
myComboBoxListener.change = function(eventObj) {
var eventSource = eventObj.target;
var theSelectedItem = eventSource.selectedItem;
var theSelectedItemLabel = theSelectedItem.label;
var theSelectedItemValue = theSelectedItem.data;
var subArray = theSelectedItemValue;
setSubCombo(subArray);
};
main_cb.addEventListener("change", myComboBoxListener);
//Place Sub-Topics Here:
//CLEAN SAMPLES
cleanArray = new Array("Please Select Your Application...", "Ultrapure Water", "Drinking Water", "River / Lake / Ground Water", "Sea Water", "Treated Raw Water");
//RAW WASTEWATER
rawArray = new Array("Please Select Your Application...", "Municipal Sewage Collection", "Power Generating Stations", "Tar Sands Produced Water", "Oil Refineries");
//Manufacturing
manufArray = new Array("Please Select Your Application...", "Food & Beverage Manufacturing", "Agricultural Water", "Pulp & Paper Process Water", "Specialty Chemical Manufacturing", "Metallurgical Manufacturing", "Semiconductor Manufacturing");
//WASTEWATER TREATMENT
wasteArray = new Array("Please Select Your Application...", "Aerobic / Activated Sludge", "Anoxic Bioreactors", "Anaerobic Sludge Reactors & Fermentors", "Trickling Filter Bioreactor", "High-Rate Activated Sludge", "Return / Waste Activated Sludge", "Biological Nutrient Removal", "Membrane Bioreactors", "Sequencing Batch Reactors", "Wastewater Treatment Effluent");
//INDUSTRIAL WATER
industrialArray = new Array("Please Select Your Application...", "Pulp Samples", "Cooling Tower Makeup / Process Water");
//UNIQUE SAMPLES / Product Testing
uniqueArray = new Array("Please Select Your Application...", "Paper Manufacturing Process Deposits", "Water Treatment System Deposits", "Waste Biosolids", "Chemical Emulsion Products", "Wastewater Treatment Bioreactor Foam Samples", "Soil", "Glue");
//
function setSubCombo(arr) {
whichArr = this[arr];
sub_cb.removeAll();
for (var i = 0; i<whichArr.length; i++) {
sub_cb.addItem(whichArr, whichArr);
}
}