Hi Everyone,
I'm having a problem with the dynamic text field autosize property. The problem I'm having is that I'm not catching the correct height of the textfield directly after the textfield is filled with text. In other words, I create a dynamic textfield and give it a set width and then I set all the properties (selectable, multiline, wordwrap, embed fonts, autosize, html etc). Then I fill it with html text and then I get its height. If you will look at my code below you can see that I have the variables a, b, and c all set to question._height. Every single time I test this and trace it in the output window I get a =34, b=92, and c=92 (92 is the correct height of the textfield). Does anyone have an explanation? The text I'm filling the textfield with is loaded from the data base way before this code executes. It seems that the code is faster than the textfield can fill up. Is there anyway to detect when the textfield has filled and autosized? test_mc.createTextField("question_txt", 1000, 0, 0, 385, 0); question = _root.test_mc.question_txt; question.selectable = false; question.multiline = true; question.wordWrap = true; question.embedFonts = true; question.autoSize = true; question.html = true; //flash is taking too much time rendering out this text question.htmlText = "<p align='center'><font face='myVerdana' size='25' color='#FFFFFF'><b>"+myHTML+"</b></font></p>"; //the following is jerry rigged and needs to be fixed a = question._height; trace("a = " + a); b = question._height; trace("b = " + b); c = question._height; trace("c = " + c); Thanks, Scott _______________________________________________ Flashcoders@chattyfig.figleaf.com 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