# Array troubles

**URL:** <https://forum.kirupa.com/t/array-troubles/180539>\
**Category:** Uncategorized\
**Created:** [March 1, 2006, 12:05pm UTC](https://forum.kirupa.com/t/array-troubles/180539 "2006-03-01T12:05:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RabBell](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rabbell/32/340_2.png) [@RabBell](https://forum.kirupa.com/u/RabBell)\
**Post date:** [March 1, 2006, 12:05pm UTC](https://forum.kirupa.com/t/array-troubles/180539/1 "2006-03-01T12:05:13Z")

</div>

ok first here is the code

```auto
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 :cool:
