# ComboBox - using values to go to labelled frames

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