Comunidad de diseño web y desarrollo en internet online

INSERTAR NUMEROS A DIFERENTES HERRAMIENTAS DE TEXTO

Citar            
MensajeEscrito el 24 Nov 2009 05:20 pm
Hola buen dia, si en mi proyecto deseo insertar numeros, pero solo quiero utilizar una herramienta de texto, y con ella alimentar de 1 hasta 10 en texto dinamico, ¿como seria? :?

Por vaq_jasson

5 de clabLevel



 

msie8
Citar            
MensajeEscrito el 24 Nov 2009 05:34 pm
O sea...

¿Lo que quieres es poner en tu escenario un text_field donde con dos botoncitos puedas incrementar del 1 al 10? Si eso quieres, el código en realidad es sencillo. Deberías hacer algo como esto:

Código ActionScript :

btn_up.onRelease=function(){
    if(Number(my_txt.text)!=10){
        my_txt.text = Number(my_txt.text)+1;
    }
}

btn_down.onRelease=function(){
    if(Number(my_txt.text)!=1){
        my_txt.text = Number(my_txt.text)-1;
    }
}


Advertencia: El código fue escrito directamente aquí, puede tener errores, lo escribí solo para ejemplificar la idea, no para que necesariamente uses AS 2 incluso.

Espero te sirva.

Saludos, Hernán . -

Por Hernán

BOFH

6148 de clabLevel

19 tutoriales
23 articulos

Genero:Masculino   REC Desarrollador de GAIA

Marketing & IT

firefox

 

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