A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: number of lines in a text field

  1. #1
    Member
    Join Date
    Feb 2003
    Location
    Washington DC
    Posts
    42

    number of lines in a text field

    Is there a way to get the number of lines a multi line text field has? It is a dynamic text field, and I need the number of lines of text has been outputted to it. I assumed it would be a property of textfield, but it's not. Thanks.

  2. #2
    Senior Member
    Join Date
    Mar 2002
    Location
    Utrecht, The Netherlands
    Posts
    184
    You can retrieve the total number of lines loaded into a textfield like this:

    Suppose you have a textfield with an instancename of myText

    PHP Code:
    // number of lines showing in myText:
    numlines = (myText.bottomScroll myText.scroll)+1;
    // number of lines you can scroll down:
    myMaxScroll myText.maxscroll;

    // total number of lines:
    myTotalLines numLines + (myMaxScroll-1); 
    Cheers, Flashmatazz

    evolving RSS reader

  3. #3
    Slinky Designs slinky2000's Avatar
    Join Date
    Jun 2001
    Location
    Ireland
    Posts
    1,227
    I know this is really old but I just wanna say thanks, this saved my bacon today!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center