Thanks, I ve seen this property after posting the question..
Just a quick question (sorry for my ignorance).
Behind this texfield, I have a MovieClip (it's a rectangle), and I would
like to adjust the height depending the textfield height (and I would like
to preserve my size font).
Right now, here's my code :
var container_mc:MovieClip=this.createEmptyMovieClip("container",10);
container_mc.attachMovie("background","newbackground",11);
var mytext_txt:TextFiled=container.createTextField
("mytext_txt",12,0,0,150,5);
mytext_txt.autosize=true;
mytext_txt.text="bla bla bla \r bla bla...";
container_mc.newbackground._height=mytext._height;
It doesn't adjust the background.
Where's my mistake ?
2005/12/20, martin schioeth <[EMAIL PROTECTED]>:
>
> Hi,
>
> You'll need to do this:
>
> createTextField("myField",depth,x,y,defWidth,defheight);
> //set the defWidth to the number you want defheight can be anything the
> //autoSize increases the height until all of the text can fit in the field
> myField.autoSize = true;
> myField.text = myText;
>
> -martin
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Stan
> Sainte-Rose
> Sent: 20. december 2005 10:07
> To: [email protected]
> Subject: [Flashcoders] CreateTextField question
>
> Hi,
>
> Is it possible to dynamically set the height of the CreateTextField ?
> Here's my need.
> I import datas from a file and generate textfields on fly
> Some datas can have a lot of rows and some of them just 2 or 3 rows.
> So I would like to adjust for each textfield the height value to get all
> the
> rows visible.
> If someone could show me how to do this or tell me if there's another
> approach.
>
> Thanks for your help
>
> Stan
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.371 / Virus Database: 267.14.1/206 - Release Date: 16-12-2005
>
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders