Skip to main content
Inspiring
May 25, 2011
Question

Text input in Air iOS with TLF

  • May 25, 2011
  • 3 replies
  • 6188 views

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 has been closed for replies.

3 replies

Participating Frequently
May 3, 2012

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;

}

Participating Frequently
May 25, 2011

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

relaxatraja
Inspiring
May 25, 2011

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.

May 25, 2011

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

Participating Frequently
May 25, 2011

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