ok first here is the code
import mx.controls.MediaPlayback;
var my_video:MediaPlayback;
var actarray = new Array();
GenerateMenu = function(container, name, x, y, depth, node_xml) {
// variable declarations
var curr_node;
var curr_item;
moviecombo.addItem("--- Select Interview ---");
for (var i=0; i<node_xml.childNodes.length; i++) {
// item submenu behavior for rollover event
if (node_xml.childNodes*.nodeName == "interview"){
curr_node = node_xml.childNodes*;
actarray* = curr_node.attributes.movloc;
//moviecombo.addItem(curr_node.attributes.name);
moviecombo.addItem(i+" : "+actarray*);
} // if
} // for
} // function
function changelist(eventObj){
var number = moviecombo.selectedIndex-1;
trace("NUM:"+number);
trace("ARR:"+actarray(number));
}
moviecombo.addEventListener("change",changelist);
I’ve edited out the XML from here cause it’s not relevant to my problem, that much I do know.
The problem is when I change an item in my combobox (moviecombo) the trace message says the value is undefined
actually what I get in my output box is
NUM:1
ARR:undefined
but the arrays contents are showing correctly in the combobox so…I’m confused
Any helps greatly appreciated