Look in the help files for the TextField class. There you will see all the properties of the that class. I think you will find that MaxScroll will tell you if all the text fits or not.
1 person found this helpful
You can use getTextExtent to solve your problem. You can also learn more about it under Flash's Help. Here is a snippet of code that should work for you. Just change the nMaxH to a pixel height of your text field. "DynText" in this example is the text field's instance name on the stage.
var sText:String = "This is my long";
var cFmt:TextFormat = this["DynText"].getTextFormat();
var oExtent:Object = cFmt.getTextExtent(sText, this["DynText"]._width);
var nH:Number = oExtent["textFieldHeight"];
var nMaxH:Number = 500; //or this["DynText"]._height or any value as delimiter
if(nH > nMaxH) ShowScrollComponent();
Hope this helps.
Thank you both so much, i actuallly used MaxScroll as i read this first and this works perfectly (although i'm sure Harry's method would have been just as effective). Evidentally i was being quite thick
Thanks so much for your help guys as ever, it is so very much appreciated,