Skip to main content
Inspiring
Oct 7, 2009 12:34 PM UTC
Answered

Get Current Controller index of blinking cursor in textflow.flowcomposer ???

Hi,

I have 10 controllers in my TextFlow and now i want to get index of controller where my cursor is blinking. i found the following function but here i don't know container having blinking cursor.

textFlow.flowComposer.getControllerIndex(controller);

Thanks

This topic is closed to new replies. Start a new post to keep the conversation going.
robin_briggsCorrect answer
Adobe Employee
Oct 9, 2009 6:55 AM UTC

What you need to do is to get the location of the cursor from the interactionManager:

var pos:int = textFlow.interactionManager.absoluteStart;

and pass it to the flowComposer to get the controller:

var controllerIndex:int = textFlow.flowComposer.findControllerIndexAtPosition(pos);


var controller:ContainerController = textFlow.flowComposer.getControllerAt(controllerIndex);

Something like that should get you what you need.

- robin

2 replies

robin_briggsCorrect answer
Adobe Employee
Oct 9, 2009 6:55 AM UTC

What you need to do is to get the location of the cursor from the interactionManager:

var pos:int = textFlow.interactionManager.absoluteStart;

and pass it to the flowComposer to get the controller:

var controllerIndex:int = textFlow.flowComposer.findControllerIndexAtPosition(pos);


var controller:ContainerController = textFlow.flowComposer.getControllerAt(controllerIndex);

Something like that should get you what you need.

- robin

Translate
chicflashAuthor
Inspiring
Oct 9, 2009 10:32 AM UTC

Thanks a lot robbin.

Translate