Xml drop down menu

hi there,

i found a xml drop down menu on the internet. The layout is generated by actionscipt and XML. (menu.xml) Now i want to attach a movieclip to the menuitems. Can anyone edit this script with a homemade MC? I would be very thankful.

greetz Tim

Here is the actionscript:

this.unDeployedFormat = new TextFormat();
this.unDeployedFormat.font = "Verdana";
this.unDeployedFormat.size = 12;
this.unDeployedFormat.bold = false;
this.unDeployedFormat.color = 0x000000;
 
this.deployedFormat = new TextFormat();
this.deployedFormat.font = "Verdana";
this.deployedFormat.size = 12;
this.deployedFormat.bold = false;
this.deployedFormat.color = 0xFFFFFF;
 
function Item(name, parent, pos, page, trgt) {
// Naam van menu
this.name = name;
this.deployed = false;
 
this.page = page;
// target van link
this.trgt = trgt;
// subitems?
this.arSubItems = new Array();
if (typeof parent == 'object') {
this.parent = parent;
this.root = this.parent.root;
this.level = parent.level + 1;
this.id = parent.id + "_" + pos;
} else if (typeof parent == 'movieclip') {
this.parent = parent;
this.root = this;
this.level = 0;
this.id = "0";
}
 
if (pos != undefined) {
this.pos = pos;
} else {
this.pos = null;
}
 
this.getDepth = function() {
if (this.level > 0) {
return (this.pos + 1) * Math.pow(10, this.level) + this.parent.getDepth();
} else {
return 0;
}
};
this.addSubItem = function(name, page, trgt) {
var newLg = this.arSubItems.push(new Item(name, this, this.arSubItems.length, page, trgt));
return this.arSubItems[newLg - 1];
};
this.display = function() {
if (this.level > 0) {
 
this.root.parent.createEmptyMovieClip("item_" + this.id, 100 + Number(this.getDepth()));
this.clip = this.root.parent["item_" + this.id];
this.clip._visible = false;
this.clip._x = 0;
this.clip._y = this.root.parent.viewHeight + 20;
 
this.clip.item = this;
 
this.clip.elasticTo = function(y) {
	this.backy = y;
	this.onEnterFrame = function() {
	 this.speedy = Number(this.speedy * this.item.root.parent.ralenti) + Number((this.backy - this._y) * this.item.root.parent.cool);
	 if (this.item.root.parent.viewHeight != null) {
	 this._visible = (this._y < this.item.root.parent.viewHeight - this.item.root.parent.itemSpacing);
	 }
	 this._y += Number(this.speedy);
	 if (Math.abs(this.speedy) < 0.1) {
	 this._y = this.backy;
	 this.onEnterFrame = null;
	 }
	};
};
this.clip.createEmptyMovieClip("bg", 1);
this.clip.bg.beginFill(this.root.parent.itemColor, this.root.parent.itemAlpha);
this.clip.bg.moveTo(0, 0);
this.clip.bg.lineTo(this.root.parent.viewWidth, 0);
this.clip.bg.lineTo(this.root.parent.viewWidth, 20);
this.clip.bg.lineTo(0, 20);
this.clip.bg.endFill();
this.clip.createTextField("labelZone", 2, 5 + 15 * this.level, 0, this.root.parent.viewWidth - (5 + 15 * this.level), 20);
 
this.clip.label = this.name;
this.clip.labelZone.selectable = false;
this.clip.labelZone.variable = "label";
this.clip.labelZone.setTextFormat(this.root.parent.unDeployedFormat);
var btParams = new Object();
btParams._alpha = 0;
this.clip.bg.duplicateMovieClip("bt", 6, btParams);
this.clip.bt._width = this.root.parent.viewWidth;
this.clip.bt._height = 20;
this.clip.bt.enabled = true;
	 if (this.arSubItems.length == 0) {
	if (this.page != undefined && this.page != null) {
	 if (this.trgt == undefined || this.trgt == null) {
	 this.clip.bt.onRelease = function() {
	 getURL(this._parent.item.page);
	 };
	 } else {
	 this.clip.bt.onRelease = function() {
	 getURL(this._parent.item.page, this._parent.item.trgt);
	 };
	 }
	}
} else {
	this.clip.bt.onRelease = function() {
	 this._parent.item.switchStatus();
	};
}
}
	for (var i = 0; i < this.arSubItems.length; i++) {
this.arSubItems*.display();
}
};
// methode voor het laten zijn van de subitems
this.unDeploy = function() {
	if (this.deployed) {
for (var i = 0; i < this.arSubItems.length; i++) {
	 this.arSubItems*.unDeploy();
	this.arSubItems*.clip.elasticTo(this.root.parent.viewHeight + 20);
}
this.clip.stClip.gotoAndPlay("undeployed");
	 this.clip.labelZone.setTextFormat(unDeployedFormat);
this.deployed = false;
this.moveAfter(-1 * this.arSubItems.length);
}
};
this.unDeployExcept = function() {
if (this.level > 0) {
for (var i = 0; i < this.parent.arSubItems.length; i++) {
	if (i != this.pos) {
	 this.parent.arSubItems*.unDeploy();
	}
	this.parent.unDeployExcept();
}
}
};
this.deploy = function() {
if (!this.deployed) {
var supPos = 0;
 
this.moveAfter(this.arSubItems.length);
this.unDeployExcept();
 
if (this.level > 0) {
	supPos = this.clip.backy + this.root.parent.itemSpacing;
}
for (var i = 0; i < this.arSubItems.length; i++) {
	this.arSubItems*.clip.elasticTo(supPos + i * this.root.parent.itemSpacing);
}
this.clip.labelZone.setTextFormat(this.root.parent.deployedFormat);
this.deployed = true;
}
};
this.moveAfter = function(nb) {
// main item first
if (this.level > 0) {
// 1pixel difference with next
for (var i = this.pos + 1; i < this.parent.arSubItems.length; i++) {
	this.parent.arSubItems*.clip.elasticTo(this.parent.arSubItems*.clip.backy + nb * this.root.parent.itemSpacing);
}
this.parent.moveAfter(nb);
}
};
this.switchStatus = function() {
if (this.deployed) {
this.unDeploy();
} else {
this.deploy();
}
};
}
// new menu
menu = new Item("Menu", this);
// loading of XML bestand
var myMenu = new XML();
myMenu.ignoreWhite = true;
// usage of unicode
System.usecodepage = !this.unicode;
myMenu.itemObject = menu;
myMenu.onLoad = function(succes) {
// searching for menu items(<items> ... </items>) 
this.setXMLMenu(this.firstChild, this.itemObject);
// Begin tiling
this.itemObject.display();
this.itemObject.deploy();
};
XML.prototype.setXMLMenu = function(xmlObject, menuObject) {
for (var i = 0; i < xmlObject.childNodes.length; i++) {
var curItem = xmlObject.childNodes*;
var itName = curItem.attributes.name;
var itUrl = curItem.attributes.adr;
var itTarget = curItem.attributes.targ;
if (itUrl == undefined) {
var curSubMenu = menuObject.addSubItem(itName);
this.setXMLMenu(curItem, curSubMenu);
} else {
menuObject.addSubItem(itName, itUrl, itTarget);
}
}
};
// loading of XML
myMenu.load(this.xmlFile);