Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 05-16-2012, 08:38 PM   #1
gadna
Registered User
 
Join Date: Apr 2012
Posts: 2
Default variable takes a value other

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
gadna is offline   Reply With Quote
Old 05-17-2012, 10:44 AM   #2
Poony
Flash Developer
 
Poony's Avatar
 
Join Date: Aug 2011
Location: Sweden
Posts: 367
Default

I didn't quite get your problem, but im quite sure your problem is related to focus.

You should find plenty of information about this if you google abit.

EDIT: Uhm, but then again, maybe not..

Last edited by Poony; 05-17-2012 at 10:50 AM.
Poony is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:07 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.