1 Reply Latest reply on Dec 16, 2013 10:54 AM by Sean_Wilson

    use lineCount (not line.count) on text cast member

    wfzen Level 1

      lineCount shows the total lines a field member occupies on stage but it does not work on text member. If I use line.count (eg. member("myText").line.count), it's the same total no matter what width you set on the text member.

       

      If I change it to field, then I can't set the width of a field member (e.g. member("a field").width = 400.

       

      How can I get lineCount of a text member?

       

      Thanks for your help,

        • 1. Re: use lineCount (not line.count) on text cast member
          Sean_Wilson Adobe Community Professional

          You can divide member.height by member.fixedLineSpace to get the number of lines the member has wrapped to. The problem is that fixedLineSpace reports 0 unless you manually alter it in the text editor window. One option is to turn off member.wordWrap, grab the member.height (assuming all your text is the same fontSize/height), turn wrapping on again, grab member.height and divide them