Código :
// 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[i];
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[i].attributes.naam.toLowerCase()) {
menuItems.knopContent.gotoAndStop("over");
}
menuItems._href = manuel[i].attributes.href;
menuItems.contentT = manuel[i].attributes.naam;
menuItems.textobotones.text = manuel[i].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");
}
}
};Tambien me gustaria que se pudiera hacer lo siguiente cuando, cliqueara algun boton en el menu, este se moviera hacia la derecha unos 1000 px. Y no se si se puede que cuando cliquee en un boton este quede marcado indicando en que seccion estoy.
Mil gracias por la ayuda
