Hi there,
I'm trying to do something really simple ( or at least it should be simple)
but I can't get it to work right. I have a textfield that gets filled with
text and I want to know how many lines are inside the textfield when it gets
filled. Some longer lines will wrap, so I just can't use a simple counter
when filling the textfield.
I've been trying to get it right with maxscroll and bottomscroll and it is
allmost right, but nog quite.
this is te code I use to test it:
[code]
_root.createTextField("txt", 100 , 100 , 100 , 100, 100);
txt.autoSize = true;
numb = 20;
for(var i = 0; i<= numb;i++){
txt.text += i + " __ sometext" + newline;
var line = (txt.bottomScroll-1) + (txt.maxscroll - 1);
trace("lineNumber = "+ (i+1)+" -- " +line +newline + "bottomscroll = "
+txt.bottomScroll +newline+ "maxscroll = "+ txt.maxscroll + newline )
}
[/code]
Can anybody help me with this, because it is driving me nuts!
thanks in advance
arjan
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com