Hola longeVie noté que fuiste vos el que me dió una mano en todos mis post.. muchas gracias!
estube vichando tu código y al hacerle click a los cuadrados este se queda en grande pero no vuelve a su tamaño normal..
para hacer eso usé este código:
Código :
import mx.transitions.Tween;
import mx.transitions.easing.*;
var Estado:Array=new Array();
for(var i=0;i<7;i++){
Estado[i]=eval("_root.mc"+i);
Estado[i].selected=false;
trace(i)
}
var Release:Function = function() {
this.miAlphaTween = new Tween(this.mcIn, "_alpha", Bounce.easeOut, 0, 100, 1.5, true);
this.selected = this.selected ? false : true ;
for( var i in this._parent ){
if( this._parent[i].selected == true && this._parent[i] != this){
this._parent[i].selected = false;
this._parent[i].onRollOut();
this.miAlphaTween = new Tween(this._parent[i].mcIn, "_alpha", Bounce.easeOut, 100, 0, 1.5, true);
}
}
}
var RollOver:Function = function() {
for(var i=0;i<7;i++){
if(_root.Estado[i].selected==true){
_root.Estado[i].onRollOut();
}
}
if(this.selected!= true){
this.miXTween = new Tween(this, "_xscale", Bounce.easeOut, this._xscale, 90, 1.5, true);
this.miYTween = new Tween(this, "_yscale", Bounce.easeOut, this._xscale, 90, 1.5, true);
}
};
var RollOut:Function = function() {
if(this.selected!= true){
this.miXTween.stop();
this.miYTween.stop();
this.miXTween = new Tween(this, "_xscale", Bounce.easeOut, this._xscale, 60, 1.5, true);
this.miYTween = new Tween(this, "_yscale", Bounce.easeOut, this._xscale, 60, 1.5, true);
}
for( var i in _root._parent ){
_root._parent[i].selected.onRollOver();
}
};
_root.mc0.onRollOut =_root.mc1.onRollOut = _root.mc2.onRollOut = _root.mc3.onRollOut =_root.mc4.onRollOut = _root.mc5.onRollOut = _root.mc6.onRollOut = RollOut;
_root.mc0.onRollOver =_root.mc1.onRollOver = _root.mc2.onRollOver = _root.mc3.onRollOver =_root.mc4.onRollOver = _root.mc5.onRollOver = _root.mc6.onRollOver = RollOver;
_root.mc0.onRelease =_root.mc1.onRelease = _root.mc2.onRelease = _root.mc3.onRelease = _root.mc4.onRelease = _root.mc5.onRelease = _root.mc6.onRelease = Release;
les cambié los nombres de instancia como verás, pq estoy haciendo una botonera con 7 botones..
con ese código.. poniendo dentro de cada mc un mc con alpha 0 y nombre de instancia mcIn vas a ver el efecto que te digo.. hasta ahí todo funciona bien.. el tema es que al hacer roll sobre otros tiene que achicarse etc. como siempre. entendes?
nosé si me explico bien.. cualquier cosa me decis .
pd.. también tengo problema con la profundidad.. ya que al hacer roll en un bot, este se agranda y tapa en parte a los demás.. usé this.swapDepths(1); pero dá algunos problemas.. en fin.. voy a ver que pasa. hasta luego!