hi!
I have a dynamic textfield that loads text from a txt file.
The content of the txt file will be modified daily by the client.
What i need is that if there is too much text in the txt file, the dynamic textfield resizes (and not only with autosize because the text can be really long).
this is what i’m using:
i have the textield inside a mc which have this code
onClipEvent (load) {
maxSize = 550;
maxSizeY = 110
myTextBox.autoSize = 'left';
myTextBox.htmlText = _root.news
if (myTextBox._width > maxSize) {
percent = (maxSize*100)/myTextBox._width;
_xscale = percent;
}
if (myTextBox._height > maxSizeY) {
percentY = (maxSizeY*100)/myTextBox._height;
_yscale = percentY;
}
}
it doesnt look very good but it works. The only problem is that if I have a really long text the maxsizeY doesnt work fine.
does anyone have a better code for this? or any ideas?
thank you so much!