Hi.
Sudoku I am writing in air. On a mobile phone.
virtual numeric keypad
If two dynamic text fields and two buttons. The task of the program would be that if I press the buttons, they both print the correct value in the text box.
Text Field Instance names are:
text1
text2
Button Instance Names:
gomb1
gomb2
Code:
Code:
s1.addEventListener(MouseEvent.MOUSE_OVER, fl_MouseOverHandler);
function fl_MouseOverHandler(event:MouseEvent):void
{
suko_gmb1.addEventListener(MouseEvent.CLICK, fl_ClickToPosition);
function fl_ClickToPosition(event:MouseEvent):void
{
s1.text = "1";
}
suko_gmb2.addEventListener(MouseEvent.CLICK, fl_ClickToPosition1);
function fl_ClickToPosition1(event:MouseEvent):void
{
s1.text = "2";
}
}
s2.addEventListener(MouseEvent.MOUSE_OVER, fl_MouseOverHandler1);
function fl_MouseOverHandler1(event:MouseEvent):void
{
suko_gmb1.addEventListener(MouseEvent.CLICK, fl_ClickToPosition11);
function fl_ClickToPosition11(event:MouseEvent):void
{
s2.text = "1";
}
suko_gmb2.addEventListener(MouseEvent.CLICK, fl_ClickToPosition12);
function fl_ClickToPosition12(event:MouseEvent):void
{
s2.text = "2";
}
}
The problem would be when I click for example. The first text box and press the button for each, or two, it will print properly, but if you continue to squeeze tried out, or you can not write anything anywhere, or both text boxes in the same type.
I think the problem may be that the button press event to get extra keys within the same event and therefore may not be able feldogozni, but unfortunately I do not know the solution.
sorry bad english