Get immediate text focus in TLF
Hi there I would be very grateful for any help regarding this quite peculiar thing I am seeing in the TLF.
Basically, what we would like to achieve is set out a TextFlow that may or not have content imported at the point of initialisation.
The problem is that the textflow will not accept focus in the sense that the user can start typing straight away but must click the sprite holding the textflow. At first I thought that this was because maybe focus could not be achieved until the flow had finished composing. So I added the CompositionCompleteEvent event and had a event handler on that waiting for it to be ready and grabbing selection using
_textFlow.interactionManager.selectRange( 0 , 0 );
_textFlow.interactionManager.setFocus();
Again no dice. So then I tried using a timer to call the same code after a second. Again no luck; the textflow will not respond to keyboard input.
If I place a button in the app and have that call the code above that works fine.I can't realistically expect people to press a button to start using the text editor , they might as well type on the screen for that.
Anybody encountered this problem before? Am I missing something obvious? Thanks in advance, you're normally excellent at giving answers. G
