astaire1
06-06-2005, 04:10 PM
I used comboBoxes to make a selection menu. The first box contains general items, the second contains sub-items that depend on which item was selected in the first, and the third depends on the items from the second.
The main is called main_cb, the second is sub_cb, and the third is subsub_cb. The data for the second box depends on an array. If cameras is selected, then cameraArray provides the data for the second comboBox.
I can get the second one to change depending on the selection from the first using this code:
function setSubCombo() {
sub_cb.removeAll();
var subArray = eval(main_cb.getSelectedItem().data);
for (var i = 0; i<subArray.length; i++) {
sub_cb.addItem(subArray[i]);
}
}
I am looking for suggestions on how to work the third box from the selected item in the second. (could the problem be that there are no labels in the second box?, just data?)
Also, I am wondering on how I could display a movie clip based on the selection from the third box...
Thanks in advance.
The main is called main_cb, the second is sub_cb, and the third is subsub_cb. The data for the second box depends on an array. If cameras is selected, then cameraArray provides the data for the second comboBox.
I can get the second one to change depending on the selection from the first using this code:
function setSubCombo() {
sub_cb.removeAll();
var subArray = eval(main_cb.getSelectedItem().data);
for (var i = 0; i<subArray.length; i++) {
sub_cb.addItem(subArray[i]);
}
}
I am looking for suggestions on how to work the third box from the selected item in the second. (could the problem be that there are no labels in the second box?, just data?)
Also, I am wondering on how I could display a movie clip based on the selection from the third box...
Thanks in advance.