Teclado virtual 3 o más tablas

  • donarturo
  • Born
  • Born
  • No Avatar
  • Registrado: Ene 12, 2012
  • Mensajes: 1
  • Status: Offline

Nota Enero 12th, 2012, 5:11 am

Hola de nuevo sigo con esto, e estado viendo unos tutoriales para enterarme mas y ahora entiendo lo que me pasaba.

La variable la creo sin condicion entonces al pulsar encima de la instancia obcion_01 onSetFocus le daba condicion true a selec01

y si se hace onSetFocus sobre obcion_02 le da la condicion false a selec01.

Ahora el problema es como añado una obccion nuevo ya que el = no existe en true o false.

E probado dandole a selec01 una condicion de numeros, alfinal la soculion fue con la condicion de la respuesta de un trace y BINGO¡¡¡

Ejemplo normal de true y false:

Código: [ Select ]
btn7.onRelease = function()
{
    if (selec01)
    {
        trace ("Obcion 1");
        obcion_01.text += "7";
    }
    else
    {
        trace ("Obcion 2");
        obcion_02.text += "7";
    }
    
}

var selec01;

obcion_01.onSetFocus = function()
{
    selec01 = true;
    trace ("Obcion 1");
}
obcion_02.onSetFocus = function()
{
    selec01 = false;
    trace ("Obcion 2");
}

obcion_03.onSetFocus = function()
{

    trace ("logrado");
}
  1. btn7.onRelease = function()
  2. {
  3.     if (selec01)
  4.     {
  5.         trace ("Obcion 1");
  6.         obcion_01.text += "7";
  7.     }
  8.     else
  9.     {
  10.         trace ("Obcion 2");
  11.         obcion_02.text += "7";
  12.     }
  13.     
  14. }
  15. var selec01;
  16. obcion_01.onSetFocus = function()
  17. {
  18.     selec01 = true;
  19.     trace ("Obcion 1");
  20. }
  21. obcion_02.onSetFocus = function()
  22. {
  23.     selec01 = false;
  24.     trace ("Obcion 2");
  25. }
  26. obcion_03.onSetFocus = function()
  27. {
  28.     trace ("logrado");
  29. }


Y el que necesitaba:

Código: [ Select ]
btn7.onRelease = function()
{
    if (selec01 == 110)
    {
        trace ("Obcion 1");
        obcion_01.text += "7";
    }
    else if(selec01 == 220)
    {
        trace ("Obcion 2");
        obcion_02.text += "7";
    }
    else
    {
        trace ("Obcion 3");
        obcion_03.text += "7";
    }
}

var selec01 = 0;

obcion_01.onSetFocus = function()
{
    selec01 = 110;
    trace ("Obcion 1");
    trace (selec01);
}
obcion_02.onSetFocus = function()
{
    selec01 = 220;
    trace ("Obcion 2");
    trace (selec01);
}

obcion_03.onSetFocus = function()
{
    selec01 = 330;
    trace ("Obcion 3");
    trace (selec01);
}
  1. btn7.onRelease = function()
  2. {
  3.     if (selec01 == 110)
  4.     {
  5.         trace ("Obcion 1");
  6.         obcion_01.text += "7";
  7.     }
  8.     else if(selec01 == 220)
  9.     {
  10.         trace ("Obcion 2");
  11.         obcion_02.text += "7";
  12.     }
  13.     else
  14.     {
  15.         trace ("Obcion 3");
  16.         obcion_03.text += "7";
  17.     }
  18. }
  19. var selec01 = 0;
  20. obcion_01.onSetFocus = function()
  21. {
  22.     selec01 = 110;
  23.     trace ("Obcion 1");
  24.     trace (selec01);
  25. }
  26. obcion_02.onSetFocus = function()
  27. {
  28.     selec01 = 220;
  29.     trace ("Obcion 2");
  30.     trace (selec01);
  31. }
  32. obcion_03.onSetFocus = function()
  33. {
  34.     selec01 = 330;
  35.     trace ("Obcion 3");
  36.     trace (selec01);
  37. }



Solo lo publico para que los que tambien esten aprendiendo hagan un esfuerzo de unas cuantas horas y cuando entiendes un poquito el funcionamiento empiezas a mezclar y alfinal lo conseguiras.



Graciasss¡¡¡
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Enero 12th, 2012, 5:11 am

Publicar Información

  • Total de mensajes en este tema: 1 mensaje
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 62 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC