# Index Circumcised

**URL:** <https://forum.kirupa.com/t/index-circumcised/70212>\
**Category:** flash\
**Created:** [November 11, 2004, 4:41pm UTC](https://forum.kirupa.com/t/index-circumcised/70212 "2004-11-11T16:41:40Z")\
**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, 4:41pm UTC](https://forum.kirupa.com/t/index-circumcised/70212/1 "2004-11-11T16:41:40Z")

</div>

Hi,

In the following the trace:

trace('lines ‘+i+’ : '+lines\*);  
returns all the nodes in the XML document.

However the trace:

//access/trace  
story\_txt.text += lines\*+field\_arr\*;  
trace(lines\*);

returns all indexes sans the last one, also it’s missing fromt the textfield output.

```auto

//Make sure the first node is the storyLines node.
	if (this.firstChild.nodeName.toLowerCase() != "storylines") {
		trace("First node wasn't the expected <storyLines>node.");
		return;
	}
	//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") {
			/*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.text, bodyPart_txt.text, verb_txt.text, name_txt.text, politician_txt.text, adjective_txt.text);
	for (i=0; i<field_arr.length; i++) {
		//access/trace
		story_txt.text += lines*+field_arr*;
		trace(lines*);
	}
};

```
