Skip to main content
Known Participant
Mar 19, 2010 10:35 AM UTC
Question

Initialize without click

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 is closed to new replies. Start a new post to keep the conversation going.

2 replies

Inspiring
Mar 19, 2010 6:07 PM UTC

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

Translate
Known Participant
Mar 20, 2010 5:07 AM UTC

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.

Translate