# Actionscript help combo box

**URL:** <https://forum.kirupa.com/t/actionscript-help-combo-box/70627>\
**Category:** flash\
**Created:** [November 15, 2004, 10:58pm UTC](https://forum.kirupa.com/t/actionscript-help-combo-box/70627 "2004-11-15T22:58:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wilfolaram](https://avatars.discourse-cdn.com/v4/letter/w/9dc877/32.png) [@wilfolaram](https://forum.kirupa.com/u/wilfolaram)\
**Post date:** [November 15, 2004, 10:58pm UTC](https://forum.kirupa.com/t/actionscript-help-combo-box/70627/1 "2004-11-15T22:58:58Z")

</div>

How can the script below be recoded to work with a flash MX 2004 combo box?

// Main Functions… This controls your Drop Down / Combo Box.

// The AddItems function assigns values to the drop down box from the external source  
function AddItems() {  
for (i=0; i\<NumItems; i++) {  
var Name = eval(“Name”+i);  
var DataRow = eval(“DataRow”+i);  
dropDown.addItem(Name, DataRow);  
}  
//Set ChangeHandler (this is the most important line).  
dropDown.setChangeHandler(“SelectItem”);  
}

// The SelectItem function tells the movie what to do when a user  
// Clicks on a certain Item in the drop down movie - this is your OnChange Handler.

// In this example we use it to open up a new URL.  
function SelectItem(){  
URLName = dropDown.getSelectedItem().label;  
URL = dropDown.getSelectedItem().data;

getURL(URL, “\_blank”);  
}
