-
How to detect length of text in dynamic text field?
Hi,
I've got a movie clip containing a dynamic text field and two buttons used to scroll the text up and down inside the movie clip. The text is loaded dynamically from a database.
Now, I want to hide the scroll buttons if the loaded text fits inside the dynamic text field without scrolling. How can I detect whether the text fits or not?
Grateful for any help!
//Mans
-
textboxes have a property called 'maxscroll' if it is set to 1 then it fits; if it is greater than 1 it scrolls. so you can do somethign like this:
code:
_root.scrollbar1._visible = (_root.txtBox.maxscroll > 1);
-
Thanks, that worked like a charm!
-
now i'm the one with same problem.. that seems to work only for 2 possibilites:
if there's text (even in a lengh that doesn't need to be scrolled; (maxscroll = 1)
if there isn't text at all; (maxscroll = 0)
But i want tha scrollbar to stay invisble if there is short text that doesn't need to be scrolled.
Thank you in advance
EDIT: i've realized by now that i always get MAXSCROLL = 1 even if nothing is loaded!....
Last edited by light_in_tunel; 08-30-2006 at 10:14 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|