Comunidad de diseño web y desarrollo en internet online

2 temas: recuadro amarillo y scroll en boton presionado

Citar            
MensajeEscrito el 09 Jun 2008 04:29 am
buenas y santas.

vi uno stutos de drag, pero no es lo quiero, pero sí algo similar.
tengo un mc que contiene varias cosas, y para scrollearlo tego dos flechitas (btnUp y btnDown) logré hacer que suba y baje 20px por cada press que haga, pero me gustaría también que continuara scrolleando cuando mantengo presionado el botón (como un navegador cualquiera o cualquier soft), no sé cómo...

dejo el code para que vean (quizás o seguro ven alguna salvajada):

Código :

if(_root.sitio.contenido._y >= 372)
{
   _root.sitio.btnUp._alpha = 20;
}

_root.sitio.btnUp.onPress = function()
{
   if(_root.sitio.contenido._y < 372)
   {
      _root.sitio.btnUp.enabled = true;
      _root.sitio.btnDown._alpha = 100;
      _root.sitio.contenido._y=_root.sitio.contenido._y+20;
   }
   else
   {
      //_root.sitio.btnUp.enabled = false;
      _root.sitio.btnUp._alpha = 20;
   }
}
_root.sitio.btnDown.onPress = function()
{
   if (_root.sitio.contenido._y > 72)
   {
      _root.sitio.btnDown.enabled = true;
      _root.sitio.btnUp._alpha = 100;
      _root.sitio.contenido._y=_root.sitio.contenido._y-20;
   }
   else
   {
      //_root.sitio.btnDown.enabled = false;
      _root.sitio.btnDown._alpha = 20;
   }
}


bien, eso por un lado, me di cuenta que al presionar la tecla ALT, viendo un sitio en flash, en algunas partes sale el símbolo (generalmente un botón) con un recuadro amarillo, qué es eso, hay forma de evitarlo? y no son las líneas de redibujo.

abrazos miles!
emiliano

Por boratlon

Claber

139 de clabLevel



 

msie7
Citar            
MensajeEscrito el 09 Jun 2008 10:10 am
Puedes meter todo en un onEnterFrame

Código :

_root.sitio.btnUp.onPress = function() {
   this._parent.onEnterFrame = function() {
      //si btnUp es un MC, puede ser this.onEnterFrame
      if (_root.sitio.contenido._y<372) {
         _root.sitio.btnUp.enabled = true;
         _root.sitio.btnDown._alpha = 100;
         _root.sitio.contenido._y = _root.sitio.contenido._y+20;
      } else {
         //_root.sitio.btnUp.enabled = false;
         _root.sitio.btnUp._alpha = 20;
      }
   };
};


Luego

_root.sitio.btnUp.onPress = function(){ delete this._parent.onEnterFrame }

Lo del reborde amarillo es cuando tiene foco, lo puedes quitar con miclip._focusrect= false

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox

 

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