Skip to main content
Participant
October 18, 2011
Answered

Invoking a numeric-only soft keyboard

  • October 18, 2011
  • 4 replies
  • 5265 views

Hi

I'm new to this community, and this is my first post. I have been a long-time Actionscript developer who recently started developing for mobile devices.

I'm developing a multi-purpose calculator that requires numeric-only input in certain textboxes, and want to invoke a numeric keypad when they are in focus.

Is there a way to achieve this on iOS?

(I'm compiling using the latest AIR 3.0 SDK.)

Thanks

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer Joe ... Ward

You can do this with StageText objects, which are a new kind of text field in AIR 3. See http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/StageText.htmlhttp://

4 replies

aeonusAuthor
Participant
October 18, 2011

Seems like I've found an answer just after posting this thread.

flash.text.StageText seems to be a handy class, and it seems like the only possible way to move forward.

Create a dynamic textfield, and on click, invoke create a StageText instance at the same location as the textfield (by setting the StageText.viewPort property)

Finally, set StageText.softKeyboardType to "numeric" and call StageText.assignFocus();

Inspiring
December 29, 2011

Hi aeonus,

do you have an example, how you solved this situation ? I tried out your suggestion, without success.

Thanks

January 3, 2012

I had this question a while back, this might help.

http://forums.adobe.com/thread/911214?tstart=0

Joe ... WardCorrect answer
Participating Frequently
October 18, 2011

You can do this with StageText objects, which are a new kind of text field in AIR 3. See http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/StageText.htmlhttp://