Hi, i have a question, i have a menu xml with as2, and i need this code charge a swf or go to a frame label. Another think i need this when i click over the buttons those stay on, and the menu move 500 px to the right like a tween.
This is my code
// Here the array object is created.
var manuel:Array = new Array();
// Here the XML object is created.
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function(success) {
// De data from the xml is loaded into flash
// Using a 'for' loop the data is placed inside the array
if (success) {
menuItems = this.firstChild;
for (i=0; i<menuItems.childNodes.length; i++) {
manuelen = menuItems.childNodes*;
manuel.push(manuelen);
}
}
// As soon as the data is loaded int the array the function below will be executed
attachMenu();
};
myXML.load("xml/menu.xml");
// This function attaches the menn buttons to the stage with the right data
function attachMenu() {
for (i=0; i<manuel.length; i++) {
var menuItems = menuHolder.attachMovie("button", "button"+i, 10000+i);
menuItems._x = menuItems._x+(menuItems._width+margin)*i;
if(pag.toLowerCase(pag) == manuel*.attributes.naam.toLowerCase()) {
menuItems.knopContent.gotoAndStop("over");
}
menuItems._href = manuel*.attributes.href;
menuItems.contentT = manuel*.attributes.naam;
menuItems.textobotones.text = manuel*.attributes.naam;
// The events when you roll over the button
menuItems.onRollOver = function():Void {
this.gotoAndStop(2);
}
// The events when you roll off the button
menuItems.onRollOut = function():Void {
this.gotoAndPlay(3);
}
// The events when you click the button
menuItems.onRelease = function():Void {
getURL(this._href, "_self");
}
}
};
My idea is the menu look like this menu. http://www.koendemuynck.com/
Thanx for everything. And an sorry but my bad english.:trout: