jwpop
05-17-2002, 09:08 PM
I'm new to actionscript and have learned a tremendous amount from this and other forums - thank you all for your help!! Now I am stumped and sure this is something simple I am overlooking. I am attempting to create a combo box to list pictures on my site. I have placed the pictures individually in frames on the layer below the layer containing the comboboxes. In frame 1 on the combo box layer and as actions for the combobox, I have placed the following script:
---begin---
onClipEvent (load) {
function combo() {
value = combo1.getSelectedItem().data;
gotoAndStop(value);
}
combo1.setChangeHandler(combo);
combo1.addItemAt(1, "Big Ben",photo1);
combo1.addItemAt(2, "Charing Cross Station",photo2);
}
---end---
I've labeled my frames with the pictures photo1, photo2,.... and my combobox is named combo1
What do I need to add or remove to make this work??? Any help will be greatly appreciated!
---begin---
onClipEvent (load) {
function combo() {
value = combo1.getSelectedItem().data;
gotoAndStop(value);
}
combo1.setChangeHandler(combo);
combo1.addItemAt(1, "Big Ben",photo1);
combo1.addItemAt(2, "Charing Cross Station",photo2);
}
---end---
I've labeled my frames with the pictures photo1, photo2,.... and my combobox is named combo1
What do I need to add or remove to make this work??? Any help will be greatly appreciated!