Comunidad de diseño web y desarrollo en internet online

menu redimencionable

Citar            
MensajeEscrito el 11 Feb 2007 12:41 am
holaz
tengo un problemita
tengo un mc (bgMenu) q se agranda al pasar el cursor sobre el, tengo tambien tres botones q solo se ven si este clip esta agrandado, pero lo q pasa es q se me agrandan tambien los botones :crap:
aqui esta el codigo

Código :


var numBtns:Number = 3;

for(i=1; i<=numBtns; i++){
   
   this["btn_"+i]._alpha = 0;
   this["btn_"+i].enabled = false;
   
   this["btn_"+i].onEnterFrame = function (){
      
      this._alpha += (this.a - this._alpha) /5;
      
      if(_parent.bgMenu._xscale <= 150){
         this.enabled = true;
         this.a = 100;
      }
   }
   this["btn_"+i].onRollOver = function (){
      this.a = 75;
   }
   this["btn_"+i].onRollOut = function (){
      this.a = 100;
   }
}
with(bgMenu){

   this.onEnterFrame = function (){
      this._xscale = f;
      this._yscale = f;
      this._xscale += (this.f - this._xscale) /6;
      this._yscale += (this.f - this._yscale) /6;
      
      if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
         this.f = 250;
         } else{
            this.f = 100;
            }
   }
}
      


alguna idea...

Por nahaliel

69 de clabLevel



Genero:Masculino  

in the middle of nowhere

msie
Citar            
MensajeEscrito el 11 Feb 2007 12:50 am
Eso es por el this.onEnterFrame(), te está cambiando la escala de toda la pelicula no solo del clip.
Hazlo asi:

Código :

bgMenu.onEnterFrame = function()
{
   this._xscale = f;
   this._yscale = f;
   this._xscale += (this.f - this._xscale) / 6;
   this._yscale += (this.f - this._yscale) / 6;
   if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
      this.f = 250;
   } else {
      this.f = 100;
   }
};

Por Zguillez

BOFH

10744 de clabLevel

85 tutoriales
17 articulos
3 ejemplos

Genero:Masculino   Bastard Operators From Hell Héroes Team Cristalab Editores

BCN

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.