| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
|
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! |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Apr 2002
Location: Whangaparaoa, New Zealand
Posts: 16
|
put your changehandler in quotations:
[code] 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); } |
|
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Apr 2002
Location: Whangaparaoa, New Zealand
Posts: 16
|
put your changehandler in quotations:
Code:
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);
}
|
|
|
|
|
|
#4 |
|
Registered User
Join Date: Apr 2002
Location: Whangaparaoa, New Zealand
Posts: 16
|
oops,
double clickey.. sorry. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ComboBoxes droping down at stage 0,0 ?? | HHSlap | Components | 0 | 01-08-2005 02:51 AM |
| replacing mx comboboxes w/ mx2004 comboboxes = white rectangle?? | robgobbler | Components | 1 | 10-15-2004 09:18 PM |
| Comboboxes and XML | malpeigne | Components | 0 | 07-27-2004 06:31 PM |
| Problem with comboboxes | pichto | ActionScript 1.0 (and below) | 0 | 01-11-2003 01:12 PM |
| ActionScripting Job - London | trinders | Projects and Positions | 0 | 03-07-2002 01:42 PM |