Foros del Web » Creando para Internet » Flash y Actionscript »

No Encuentro el Codigo DaVinci...

Estas en el tema de No Encuentro el Codigo DaVinci... en el foro de Flash y Actionscript en Foros del Web. este es un boton que al hacerle rollover alarga un subrayado..para subrayar la palabra en la que se esta haciendo el rollOver, y que al ...
  #1 (permalink)  
Antiguo 16/02/2007, 19:26
 
Fecha de Ingreso: febrero-2005
Ubicación: MEXICO
Mensajes: 455
Antigüedad: 19 años, 2 meses
Puntos: 5
Exclamación No Encuentro el Codigo DaVinci...

este es un boton que al hacerle rollover alarga un subrayado..para subrayar la palabra en la que se esta haciendo el rollOver, y que al hacerle el rollOut se unsubraya..

rollOver= incrementa el valor de x(width) hasta 'J' tamaño, donde J=un valor maximo

rollOut= decrementa el valor de x(width) hasta Cero

CODE:
on(rollOver){
onEnterFrame = function() {
this.clip._width+=10;
if (this.clip._width>=J)
delete onEnterFrame;
};
}

on(rollOut){
onEnterFrame = function() {
this.clip._width-=10;
if (this.clip._width==0)
delete onEnterFrame;
};
}

END CODE.

duda:
como condiciono que si se presiona el boton el valor de x se incrementre hasta 'J' tamaño..y que los rollOver, rollOut se desactiven..

YO SUPONGO ALGO ASI:

if(presionas este boton){
onEnterFrame = function() {
this.clip._width+=10;
if (this.clip._width>=J)
delete onEnterFrame;
};
}


else{
on(rollOver){
onEnterFrame = function() {
this.clip._width+=10;
if (this.clip._width>=J)
delete onEnterFrame;
};
}

on(rollOut){
onEnterFrame = function() {
this.clip._width-=10;
if (this.clip._width==0)
delete onEnterFrame;
};
}


Pero evidentemente no se aplicar correntamente la programacion en la parte de presionas este boton..cual es el codigo DaVinci?

cualquier sugerencia, bien recibida. gracias.
nota: es un boton, y la programacion se la aplico directamente al boton.
__________________

  #2 (permalink)  
Antiguo 17/02/2007, 12:23
 
Fecha de Ingreso: febrero-2005
Ubicación: MEXICO
Mensajes: 455
Antigüedad: 19 años, 2 meses
Puntos: 5
Re: No Encuentro el Codigo DaVinci...

agrego la imagen, para ver si alguien se anima:

NOTA: LAS TRES PRIMERAS CARACTERISTICAS YA FUNCONAN, SOLO ME FALTA LA ULTIMA.
Vamos amigos, no es tan dificil no.. solo es una linea de codigo.
__________________


Última edición por cpucpu; 17/02/2007 a las 12:43
  #3 (permalink)  
Antiguo 17/02/2007, 13:26
Avatar de Bandit
Moderador
 
Fecha de Ingreso: julio-2003
Ubicación: Lima - Perú
Mensajes: 16.726
Antigüedad: 20 años, 9 meses
Puntos: 406
Re: No Encuentro el Codigo DaVinci...

Hola cpucpu:
Prueba deshabilitando el botón para evitar que funcione el rollOut.
Adiciona éste código después del rollOver:
on(release){
J = 200;
onEnterFrame = function () {
this.clip._width += 10;
if (this.clip._width>=J) {
delete onEnterFrame;
btn.enabled = false;
}
};
}
btn es el nombre de instancia del botón.

Espero haberte sido de ayuda.
__________________
Bandit.
Si no sabes estudia y si sabes enseña.
http://www.banditwebdesign.com/
  #4 (permalink)  
Antiguo 17/02/2007, 13:39
 
Fecha de Ingreso: febrero-2005
Ubicación: MEXICO
Mensajes: 455
Antigüedad: 19 años, 2 meses
Puntos: 5
Re: No Encuentro el Codigo DaVinci...

No puede ser Bandit,
me has salvado el cuello mas de una vez..

Te lo agradesco. ^_-
__________________

Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 21:54.