# Help finding line position of character

**URL:** <https://forum.kirupa.com/t/help-finding-line-position-of-character/119712>\
**Category:** Uncategorized\
**Created:** [August 17, 2004, 3:29pm UTC](https://forum.kirupa.com/t/help-finding-line-position-of-character/119712 "2004-08-17T15:29:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![serkios](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/serkios/32/608_2.png) [@serkios](https://forum.kirupa.com/u/serkios)\
**Post date:** [August 17, 2004, 3:29pm UTC](https://forum.kirupa.com/t/help-finding-line-position-of-character/119712/1 "2004-08-17T15:29:24Z")

</div>

I have a flash app that cycles through different paragraphs of a text field and selects them. To find the paragraphs I find the character position of the first and last characters within the field. What I’m wondering is if there is a way to find out what line number a particular character in a text field is on so that I can adjust the text field to automatically set a scroll position to a line with that first character. Currently as I select pargraphs in my text field, the selected text goes beyond the viewable area of the text field.

If you want an example take a page or so of text with paragraph pages and paste it into the big text frame on [this page.](http://grantdavisdesign.com/cob_test/xml/stringSplitter_new.swf) Once you hit “commit” it will find the paragraphs and you can use Next and Prev to scroll through them. (its a very rough alpha version utility to generate XML)

Any help is appreciated!
