Virtual keyboard 3 or more tables

  • donarturo
  • Born
  • Born
  • donarturo
  • Posts: 1

Post 3+ Months Ago

Hello again I continue with this and been seeing a few tutorials to learn more and now understand what was happening to me.

The variable think without condition then press on the instance obcion_01 onSetFocus gave condition true to selec01

and if done onSetFocus on obcion_02 him gives the condition false selec01.

Now the problem is how I would add a new obccion because the = does not exist in true or false.

And tried giving selec01 a condition of numbers, the soculion finally was under the condition of the response of a trace and BINGO!!!

Normal example of true and false:

Code: [ 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. }


And that I needed:

Code: [ 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. }



Only public it so that they also are learning make an effort of a few hours and when you understand a little bit operation start to mix and finally the conseguiras.



Graciasss!!!

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 8 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.