Helaas, dat werkt ook niet:
Mischien duidelijker als je de hele code ziet?
// Breedte van een menu button
width = 20;
breedbutton = 150;
height = 40;
// Hoogte van een menu button
space = 5;
// Ruimte tussen de buttons
mvp = _root.createEmptyMovieClip("movieplace", 0);
mvp._x = 200;
mvp._y = 50;
mvp.loadMovie("default.jpg");
menuXML = new XML();
menuXML.ignoreWhite = true;
menuXML.onLoad = function(success) {
if (success) {
childs = menuXML.firstChild.childNodes;
ln = childs.length;
for (var i = 0; i<ln; i++) {
var item = _root.createEmptyMovieClip("menuitem"+i, i+1);
item.createTextField("txt", 1, 0, 0, breedbutton, height);
item._y = i*(width+space);
item._x = 10;
item.txt.text = childs[i].firstChild.nodeValue;
item.text.font = Arial;
item.link = childs[i].attributes.link;
item.onRelease = function() {
mvp.getURL(this.link, "_blank");
};
item.mov = childs[i].attributes.url;
item.onrollOver = function() {
mvp.loadMovie(this.mov);
};
}
}
};
menuXML.load("menu.xml");