# Combine indexes

**URL:** <https://forum.kirupa.com/t/combine-indexes/70204>\
**Category:** Uncategorized\
**Created:** [November 11, 2004, 3:58pm UTC](https://forum.kirupa.com/t/combine-indexes/70204 "2004-11-11T15:58:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cki](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@cki](https://forum.kirupa.com/u/cki)\
**Post date:** [November 11, 2004, 3:58pm UTC](https://forum.kirupa.com/t/combine-indexes/70204/1 "2004-11-11T15:58:01Z")

</div>

Hi,

In the following, when the create\_btn is released, I need to combine the storyLine indexes with the textField input. I have the storyLines populating the textbox, but the inputText field attempts simply retuns the name of the field and it’s depth.

Also how can I change an array keys to start at a 1 count not 0?

```auto

//Yes we do, start the parsing process
	storyLinesNodeXML = this.firstChild.childNodes;
	//Loop through each of the <storyLine>nodes.
	for (var i = 0; i<storyLinesNodeXML.length; i++) {
		//make sure your working with <storyLine>nodes.
		if (storyLinesNodeXML*.nodeName == "storyLine") {
			//define variables 
			line1;
			line2;
			line3;
			line4;
			line5;
			line6;
			line7;
			//end variables.
			/*trace(storyLinesNodeXML*);*/
			/*trace(storyLinesNodeXML*.attributes.title);*/
			//initialize a 'shortcut' Array
			lines = new Array();
			// populate it
			for (var i = 0, len = storyLinesNodeXML.length; i<len; i++) {
				lines* = storyLinesNodeXML*.firstChild.nodeValue;
			}
			// access/trace it
			for (i=0, len=lines.length; i<len; i++) {
				trace('lines '+i+' : '+lines*);
			}
		}
	}
}
//Button for creating the story;
create_btn.onRelease = function() {
	var field_arr = new Array(noun_txt, bodyPart_txt, verb_txt, name_txt, politician_txt, adjective_txt);
	for (i=0; i<field_arr.length; i++) {
		//access/trace
		story_txt.text += lines*+field_arr*;
	}
};

```
