Skip to main content
Inspiring
September 27, 2012
Question

ios soft keyboard

  • September 27, 2012
  • 3 replies
  • 1192 views

I'm creating an app for the ipad with several text input fields. Touching a field brings up the soft keyboard but without the 'next' button (which my client wants to make moving between the text fields easier). Does anyone know how to enable it?

Thanks in advance...

This topic has been closed for replies.

3 replies

Adobe Employee
September 27, 2012

If you are using StageText class for text input fields, you can set the returnKeyLabel property of StageText to next

===========================================================================================

var st:StageText = new StageText();
st.stage = stage;
st
.viewPort = new Rectangle(x, y, width, height);
st.returnKeyLabel = ReturnKeyLabel.NEXT;
st
.addEventListener(KeyboardEvent.KEY_DOWN, keyDownEventHandler);


private function keyDownEventHandler(event:KeyboardEvent):void
{
     // logic for moving focus to next text input field  

}


===========================================================================================

Hope it helps!!

Inspiring
September 27, 2012

Thanks for your help.

Stupid question time…

I presume I need something like the following:

import flash.text.StageText;

But get the following when I try to compile:

VerifyError: Error #1014: Class flash.text::StageText could not be found.

I’ve been using Flash CS5.5 and Air2.7 but have just upgraded to Air3.4 and still get the error. Any idea where I might be going wrong?

Thanks again,

Alan