Use question.textHeight not question._height

-s 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of Scott Brantley
> Sent: Friday, May 26, 2006 1:32 PM
> To: Flashcoders mailing list
> Subject: RE: [Flashcoders] problems with dynamic text field 
> autosize property
> 
> 
> I think you may be right. If you look at my code it works 
> perfectly. I'm
> just pissed that it took something as stupid as getting the height of
> the textfield in 3 different variables. It actually works on the 2nd
> variable. You see I put all my code in functions. But, I don't use
> classes and prototypes and the like. I was thinking maybe it had
> something to do with that. Thanks for answering though. I posted the
> same question on a couple of forums and got no response at all.
> 
> 
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Duncan
> Reid
> Sent: Friday, May 26, 2006 4:15 PM
> To: Flashcoders mailing list
> Subject: Re: [Flashcoders] problems with dynamic text field autosize
> property
> 
> Hi Scott,
> 
> I think it's one of those "wait a frame" type deals, either 
> that or try
> question.textHeight.
> 
> Dunc
> 
> 
> On 5/26/06, Scott Brantley <[EMAIL PROTECTED]> wrote:
> >
> > 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
> >
> _______________________________________________
> 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
> _______________________________________________
> 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

_______________________________________________
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

Reply via email to