# ComboBox - using values to go to labelled frames

**URL:** <https://forum.kirupa.com/t/combobox-using-values-to-go-to-labelled-frames/38692>\
**Category:** flash\
**Created:** [December 28, 2003, 9:32am UTC](https://forum.kirupa.com/t/combobox-using-values-to-go-to-labelled-frames/38692 "2003-12-28T09:32:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carixpig](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/carixpig/32/304_2.png) [@Carixpig](https://forum.kirupa.com/u/Carixpig)\
**Post date:** [December 28, 2003, 9:32am UTC](https://forum.kirupa.com/t/combobox-using-values-to-go-to-labelled-frames/38692/1 "2003-12-28T09:32:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 28, 2003, 10:32am UTC](https://forum.kirupa.com/t/combobox-using-values-to-go-to-labelled-frames/38692/2 "2003-12-28T10:32:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 29, 2003, 1:57am UTC](https://forum.kirupa.com/t/combobox-using-values-to-go-to-labelled-frames/38692/3 "2003-12-29T01:57:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 29, 2003, 11:49am UTC](https://forum.kirupa.com/t/combobox-using-values-to-go-to-labelled-frames/38692/4 "2003-12-29T11:49:26Z")

</div>

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.
