Skip to main content
Known Participant
March 19, 2010
Question

Initialize without click

  • March 19, 2010
  • 1 reply
  • 548 views

Hi

In my application i am unable to write text before clicking inside the text flow.Is there any solution for this problem so that it will not require to click inside before writing and initialize automaticaly when i start my application.

Thanks.

This topic has been closed for replies.

1 reply

Adobe Employee
March 19, 2010

textFlow.interactionManager.setFocus can be used to give focus to a specific textFlow.  For example, if s is a Sprite on the stage this code works.

            var textFlow:TextFlow = new TextFlow();
            textFlow.flowComposer.addController(new ContainerController(s,500,400));
            textFlow.flowComposer.updateAllControllers();
            textFlow.interactionManager = new EditManager();
            textFlow.interactionManager.selectRange(0,0);
            textFlow.interactionManager.setFocus();

Hope that helps,

Richard

Known Participant
March 20, 2010

Hi Richard

I follow the suggestions but with this cursor start blinking inside the my text flow but it doesn't allow me to write anything until i click inside the textflow.