---------------------------------------------------------------------------------------------------------------------
CODE :1
1) NEED TWO TEXT BOXES
2) NEED TWO INSTANCE NAMES Tt1 , Tt2.
---------------------------------------------------------------------------------------------------------------------
//http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7d01.html
//http://www.dakmm.com/?p=272
//http://stackoverflow.com/questions/7630620/keyboard-event-as3-not-working
// find this:stage.addEventListener(KeyboardEvent.KEY_UP, keyReleased);
Tt1.addEventListener(KeyboardEvent.KEY_UP,Fn1)
function Fn1(e:KeyboardEvent):void {
trace(Tt1.text);
Tt2.text = Tt1.text
}
---------------------------------------------------------------------------------------------------------------------
CODE :1
1) NEED TWO TEXT BOXES
2) NEED TWO INSTANCE NAMES InputBox1 , TextBox2.
---------------------------------------------------------------------------------------------------------------------
//http://www.dakmm.com/?p=272
InputBox1.addEventListener(KeyboardEvent.KEY_UP, idKey);
function idKey(evt:KeyboardEvent):void{
var keyString:String = new String(evt.keyCode);
InputBox1.text = ""
TextBox2.text = keyString;
}
-------------------------------------------------------------------------------------------------------------------
MAXIMUM CHARACTERS IN TEXT BOX AS2 AS3 CODE
http://help.adobe.com/en_US/as2/reference/flashlite/WS5b3ccc516d4fbf351e63e3d118cd9b5f6e-77b2.html
-------------------------------------------------------------------------------------------------------------------
this.createTextField("age_txt", this.getNextHighestDepth(), 10, 10, 30, 22); age_txt.type = "input"; age_txt.border = true; age_txt.maxChars = 2;-------------------------------------------------------------------------------------------------------------------
CODE AS2 AS3:
//TEXT BOX INSTANCE NAME Txt1
Txt1.maxChars = 2;
-------------------------------------------------------------------------------------------------------------------
CODE TEXTBOX RESTRICT CHARACTER IN AS2 AS3
CODE AS2 AS3:
//http://www.w3schools.com/colors/colors_names.asp
//http://www.w3schools.com/css/css3_gradients.asp
//http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/graphics/RadialGradient.html
//TEXTBOX RESTRICT CHARACTER IN AS2 AS3
//NEED A TEXT BOX WITH INTANCE NAME: Txt1
Txt1.restrict = "0-9";
Txt1.opaqueBackground = 0x0000FF;
Txt1.borderColor=0x0000FF;
Txt1.backgroundColor=0xFFD700 ;
Txt1.textColor = 0x006400;
EmoticonEmoticon