Tengo este codigo que es de una pagina de tutoriales.
Estoy tratando de limpiarlo pasandolo a action script 2 cambiando unos terminos pero la verdad no pude con el final con el trace, alguien me podria colaborar?
Se los agradeceria demasiado.
import gs.*;
import gs.plugins.*;
TweenPlugin.activate([BlurFilterPlugin]);
var buttonsArray:Array = new Array(homeButton,portfolioButton,aboutButton,contactButton);
//Loop through the buttons array
for (i = 1; i <= labels.length; i++) {
//Add event listeners for the button
buttonsArray[i].addEventListener(MouseEvent.MOUSE_OVER, mouseOverButton);
buttonsArray[i].addEventListener(MouseEvent.CLICK, buttonClicked);
}
//Move the buttonBackground under the home button (= starting position)
buttonBackground.x = homeButton.x;
buttonBackground.y = homeButton.y;
//Make the buttonBackground a bit bigger than the home button
buttonBackground.width = homeButton.width + 10;
buttonBackground.height = homeButton.height + 10;
//Tween the buttonBackground to a random color using TweenMax
TweenMax.to(buttonBackground, 0.1, {tint: Math.random() * 0xffffff});
//This function is called when the mouse is over a button
mouseOverButton = function
//Assign the button to a local variable
var button:MovieClip = (MovieClip)(e.target);
//Calculate the new target width and height for the buttonBackground
var targetWidth:Number = button.width + 10;
var targetHeight:Number = button.height + 10;
//Tween the buttonBackground's position, size and color (color is random)
TweenMax.to(buttonBackground, 0.5, {x: button.x, y: button.y,
width:targetWidth, height:targetHeight, tint: Math.random() * 0xffffff});
}
buttonClicked = function ()
//Add your logic here!
trace(e.target.name + " was clicked!");
}