package
{
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.geom.Matrix;
import flash.geom.ColorTransform;
import flash.events.Event;
public class superboton extends Sprite
{
private var estrecho:Number;
private var centro:Number;
private var alto:Number;
private var cambioColor:ColorTransform = new ColorTransform ;
private var colore:uint;
private var positionX:Number;
private var positionY:Number;
private var avance:Number;
public function superboton()
{
estrecho = 300;
centro = this.width;
alto = this.y;
colore = 0x00CCFF;
cambioColor.color = colore;
this.addEventListener(MouseEvent.ROLL_OVER, blur);
stage.addEventListener(MouseEvent.MOUSE_MOVE,mousePosition);
}
private function mousePosition(event:MouseEvent):void
{
positionX = parent.mouseX;
positionY = parent.mouseY;
}
private function blur(Event:MouseEvent):void
{
this.transform.matrix = new Matrix(1,0,0,1,72,this.y);
this.transform.colorTransform = cambioColor;
this.width = 32;
this.alpha = .9;
}
}
}
He tratado de resolverlo con un condicional pero no funciona. Agradecería la ayuda y cualquier tip que me pudieran dar ustedes que son los expertos.