Combo box and change handler - in over my head

Howdy all,

Anyone know how I can set the data in my combo box = the name of a textfile to be loaded into a dynamic textbox?

I am trying a combo box for the first time. I’ve used AS to load it but am now having trouble with the ChangeHandler function. I only have a couple of items in the combo box and I am using them to load dynamic text files. I am using the following code that I adapted from another thread I found. “sort” is the instance name of my combo box. MCtxt is the name of my dynamic text box:

// change handler callback
function textSort(filename) {
loadText = new LoadVars();
loadText.onLoad = function(success) {
if (success) {
_root.MCtxt.html = true;
_root.MCtxt.htmlText = this.sortMC;
// data provider
var filename = sort.getSelectedItem().data;
var data_array = new Array();
// first item
data_array[0] = {label:“Sort documents”, data:""};
// second item
data_array[1] = {label:“By Date”, data:“documents/sort_date.txt”};
// third item
data_array[2] = {label:“By Type”, data:“documents/sort_type.txt”};
// set data provider
// set change handler

I can’t figure out how to set “filename” = to the data_array. Can anyone help? :smiley: