Copy link to clipboard
Copied
Hello,
I have TLF Text Editable with the name of sID. How i can add event handler to display number panel on Android & make the user to enter a number...?!
Regards,
Actually you should avoid TLF in mobile for performance reasons.
Take a look at StageText (http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/StageText.html). Here is nice intro to using it: http://blogs.adobe.com/cantrell/archives/2011/09/native-text-input-with-stagetext.html
Chris Griffith
Copy link to clipboard
Copied
Actually you should avoid TLF in mobile for performance reasons.
Take a look at StageText (http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/StageText.html). Here is nice intro to using it: http://blogs.adobe.com/cantrell/archives/2011/09/native-text-input-with-stagetext.html
Chris Griffith
Copy link to clipboard
Copied
thanks Mr. Griffith but i really don't get it. I know there is alot of propety and classes but i don't know how to use it. Can you explain it to me. please ?!
Regards,
Copy link to clipboard
Copied
Ok, I have create StageText using the code below:
var myTextField:StageText = new StageText();
myTextField.stage = stage;
myTextField.viewPort = new Rectangle(0, 0, 100, 30);
I have to questions:
1) How to add border to the Rectangle...?!
2) can i add StageText into MovieClip...?!
Regards,
Copy link to clipboard
Copied
Ok, Now i know how to use StageText but I want this text only display on frame 99 and remove it when i go to another frame. How can i do that...?!
This is my code:
var myTextField:StageText = new StageText();
myTextField.stage = this.stage;
myTextField.softKeyboardType = SoftKeyboardType.NUMBER;
myTextField.maxChars = 12;
myTextField.restrict = "0-9";
myTextField.fontFamily = "FS_Ahram";
myTextField.fontSize = 21;
myTextField.textAlign = "right";
myTextField.viewPort = new Rectangle(180,105,280.95,45);
Regards,
Copy link to clipboard
Copied
Just set your instance of the StageText to null when you are done needing it to be displayed.
Copy link to clipboard
Copied
like this...?!
myTextField = null;
So, the null value will remove this instance...?!
Copy link to clipboard
Copied
Thanke Mr. Griffith. The code is ![]()
myTextField.stage = null;
Regards,
Find more inspiration, events, and resources on the new Adobe Community
Explore Now