Skip to main content
Participant
October 7, 2009
Question

getCharBoundaries method available?

  • October 7, 2009
  • 1 reply
  • 536 views

hi all

i ran into a problem when i was trying to convert my text highlighting class,

for the TextField towards the TextFlow system of the text layout framework.

because my highlighting class depended on getCharBoundaries method to get the position and size of charakters.

but it seems textflow doesnt have that method anymore. is there anyother method that would allow me to get the x and y position of a charakter?

any help on the subject would be greatly appreciated

This topic has been closed for replies.

1 reply

Adobe Employee
October 9, 2009

I would suggest looking at some of the methods on the flash.text.engine.TextLine. There are methods there for getting the "atoms" which are one or more characters, you can get the bounds. You can get the TextFlowLine from the IFlowComposer (textFlow.flowComposer), and once you've found the TextFlowLine you want, it will have a TextLine associated with it. I think that will give you what you're looking for.

- robin