Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

Enter number on AIR for Android. How ?!

Guest
Feb 14, 2013 Feb 14, 2013

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,

TOPICS
Development
1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 15, 2013 Feb 15, 2013

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

Translate
Community Expert ,
Feb 15, 2013 Feb 15, 2013

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 16, 2013 Feb 16, 2013

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,

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 16, 2013 Feb 16, 2013

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,

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 17, 2013 Feb 17, 2013

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,

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 17, 2013 Feb 17, 2013

Just set your instance of the StageText to null when you are done needing it to be displayed.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 17, 2013 Feb 17, 2013

like this...?!

myTextField = null;

So, the null value will remove this instance...?!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 19, 2013 Feb 19, 2013
LATEST

Thanke Mr. Griffith. The code is

myTextField.stage = null;

Regards,

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines