I'm trying to use the source code that Jeff put up regarding comboboxes and loading data from a text file using LoadVars. I want to be able to select something from the list and extract the data from it. I'm having a hard time calling it. Here is what I have:
function loadBox() {
popupholder.loadMovie ("jobPopup.swf");
graphicNumber = this._name.substr(-1)
trace("filename = " + DataRow) // I want to call this file up
trace(reviewFiles_lb.getSelectedItem());
}
rv = new LoadVars();
rv.onLoad = AddItems;
rv.load("jobs_iit.txt");
function AddItems() {
numItems = rv.NumItems;
for (i = 0; i < numItems; i++) {
var Name = eval("rv.jobName" + i);
var DataRow = eval("rv.fileName" + i);
var Desc = eval("rv.Desc" + i);
var DataProvider = {Link:DataRow, desc:Desc};
reviewFiles_lb.addItem(Name, DataProvider);
}
reviewFiles_lb.setChangeHandler("loadBox");
}
As you can see by my trace command in the loadBox function, thats what I want to call up, but it only calls up the last data in the list.
Any help would be appreciated.
Jiffy