Skip to main content
Inspiring
May 25, 2011 12:52 AM UTC
Question

Text input in Air iOS with TLF

I just asked this question here: http://forums.adobe.com/thread/855971?tstart=0 but I think this might be a better forum for it.

I had just successfully published one of our projects on an iPod touch - and we were really impressed at how much worked straight away.  We were also impressed with the performance.  However one think that did not work was text input into a TLF field.  I published from a trial version of CS5.  When you tap in the input field (TLF) it gets a cursor - but no virtual keyboard is brought up - is there a special function that needs to be called?

This topic is closed to new replies. Start a new post to keep the conversation going.

11 replies

Participating Frequently
May 3, 2012 11:48 PM UTC

import flash.display.Sprite;

import flash.display.Stage;

import flash.text.*;

import flash.events.*;

var myTextInput:TextField = new TextField();

myTextInput.type = TextFieldType.INPUT;

myTextInput.background = true;     

myTextInput.text = "Search..";

Object(root).addChild(myTextInput);

myTextInput.addEventListener(EVENT.CHANGE, inputEventCapture);

function inputEventCapture(event:Event):void{

    Object(root).myTLF.text = myTextInput.text;

}

Translate
Participating Frequently
May 25, 2011 3:58 PM UTC

Unfortunately, using TLF for input fields is not supported on iOS yet.

Translate
relaxatraja
Inspiring
May 25, 2011 6:20 AM UTC

There is no special function to activate the native keyboard when it focused itz automatically get activated. Instead of TLF use with the classic text box and give it a try.

Translate
May 25, 2011 8:09 AM UTC

yea, classic input textfields trigger the softkeyboard themselves. we had no success with TLFs but found some kinda workaround if TLF is really necessary:

http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/display/InteractiveObject.html#needsSoftKeyboard

Translate
Participating Frequently
May 25, 2011 4:22 PM UTC

The InteractiveObject keyboard control APIs aren't supported on iOS, either.

Translate