# Works in flash 6 not in 8 - why?

**URL:** https://forum.kirupa.com/t/works-in-flash-6-not-in-8-why/209970
**Category:** Uncategorized
**Created:** [December 13, 2006, 7:43pm UTC](https://forum.kirupa.com/t/works-in-flash-6-not-in-8-why/209970 "2006-12-13T19:43:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rynobot](https://avatars.discourse-cdn.com/v4/letter/r/bbce88/32.png) [@rynobot](https://forum.kirupa.com/u/rynobot)
#### Post date: [December 13, 2006, 7:43pm UTC](https://forum.kirupa.com/t/works-in-flash-6-not-in-8-why/209970/1 "2006-12-13T19:43:39Z")

</div>

This xml menu code works in flash 6, but not in flash 8…  
what am i missing?

Here is the Actionscript:

```auto
function loadXML(loaded) {
	if (loaded) {
		var xmlContent = this.firstChild;
		menuContent = new Array();
		for (var i = 0; i<this.firstChild.childNodes.length; i++) {
			nextEntry = xmlContent.childNodes*;
			menuContent* = [nextEntry.attributes.name, nextEntry.attributes.value];
		}
		//trace(menuContent);
		menuLength = menuContent.length;
		elementspacer = 1;
		var menuItem, yPosition = 0;
		createEmptyMovieClip("clipContainer", 1);
		for (var i = 0; i<menuLength; i++) {
			clipContainer.attachMovie("element", "menuItem"+i, i);
			thisClip = clipContainer["menuItem"+i];
			thisClip.menuname = menuContent*[0];
			thisClip.destination = menuContent*[1];
			thisClip._y = yPosition;
			yPosition += Math.floor(thisClip._height+elementspacer);
		}
	} else {
		trace("Error loading xml");
	}
}
function setMenu(value) {
	getURL("http://"+value, "blank");
}
importXML = new XML();
importXML.ignoreWhite = true;
importXML.onLoad = loadXML;
importXML.load("menu.xml");

```

Here is the XML:

```auto
<?xml version="1.0"?>
<select>
	<option name="Google" value="www.google.com"/>
	<option name="Yahoo!" value="www.yahoo.com"/>
	<option name="Kirupa" value="www.kirupa.com"/>
</select>

```
