Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/04/2007, 11:45
Rizzo
 
Fecha de Ingreso: septiembre-2006
Mensajes: 1.193
Antigüedad: 17 años, 6 meses
Puntos: 30
Re: problemas con capas en AS :/

cambio de color

Código:
this.onRollOver = function() {
	zoom(200);
};
this.onPress = function() {
	var my_color:Color = new Color(this);
	my_color.setRGB(0xff9933);
	getURL("http://www.google.com");
};
this.onRollOut = function() {
	zoom(100);
};
function zoom(porcentaje:Number) {
	this.onEnterFrame = function() {
		this._yscale = this._xscale -= (this._xscale-(porcentaje))*0.3;
		if (Math.round(this._yscale) == porcentaje) {
			delete this.onEnterFrame;
		}
	};
}

ó alpha


Código:
this.onRollOver = function() {
	zoom(200);
};
this.onPress = function() {
	this._alpha = 50;
	getURL("http://www.google.com");
};
this.onRollOut = function() {
	zoom(100);
};
function zoom(porcentaje:Number) {
	this.onEnterFrame = function() {
		this._yscale = this._xscale -= (this._xscale-(porcentaje))*0.3;
		if (Math.round(this._yscale) == porcentaje) {
			delete this.onEnterFrame;
		}
	};
}