ComboBox - using values to go to labelled frames

Hi,

This is my first go with a comboBox. Unfortunately the actionscript dictionary and my books are not very explicit with their instrucitons.

I’ve created a changHandler function for my combo box and an array with all my frame labels. This is on frame 1, teh comboBox instance name is “quickLinks”:
[AS]
quickLinks.setChangeHandler(“quickLinksHandler”, _root);
function quickLinksHandler(){
//get the value of the selected line in the combo box list
var value = quickLinks.getValue();
//use the value as a frame label in a go to and stop action
gotoAndStop(“MainScene”, value);
trace(value);
}
[/AS]
I’ve also tried
[AS]
quickLinks.setChangeHandler(“quickLinksHandler”, _root);
function quickLinksHandler(){
frameLabels = [“QUICK”, “AEROART”, “ALBUM”, “BREAK”, “CHAT”, “CURRENT”, “EMAIL”, “FAQ”, “FLICKS”, “LINKS”, “MESSAGE”, “MOUTHWORX”, “NEWS”, “NEWBEATS”, “OLDBEATS”, “RADIO”, “RECORD”, “ROOTS”, “SHOW”, “SHOUTS”];
//get a number from the combo list
var selIndex = quickLinks.getSelectedIndex();
//use the number “selIndex” to get a string from the “frameLabels” array
//go to and stop at a frame label
gotoAndStop(“MainScene”, frameLabels[selIndex]);
trace(selIndex);
trace(frameLabels[selIndex]);
}
[/AS]

the trace actions work and give me the desired output, but when I make a selection from the combo box, it goes to the end of timeline in that scene rather than the frame label.

If I just use getSelectedIndex() to get a number and then go to that frame number it works, but for a list of 19 options, I want to be using frame labels rather than keep track of frame numbers.

So, the problem is going to a frame label instead of a frame number when making selections from the comboBox.

Thanks for your time.

I think it has to do with the scences, i for one, hate scenes.
You ever think about just loading different movieclips. I hate scenes.

Scenes make it so much easier to organize your work, especially with prelaoders (in the first scene) preloader to content transition (scene 2) and then the content (scene 3).

I will be loading different movieclips, the comboBox menu takes you to the frame in teh main timeline where the actions are to load the movie. The comboBox and other graphics are already loaded in the main movie, so it seems simple enough to go to a new frame and load the content.

But that said, I just worked out how to fix the problem. Even if you didn’t mean it, you helped out just there norie.

i always intend to help :beam: . My problem with scences is that they get really buggy… i just don’t like em. Most of my websites/movies are only one frame anyways (i like to AS everything, mostly) so i have no need for them.