Found the culprit: 

        txt.wordWrap = true; 

all is fine if I remove that.




-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Karim
Beyrouti
Sent: 10 October 2008 15:17
To: 'Flash Coders List'
Subject: RE: [Flashcoders] TextField - autoSize

This is what I get: http://underground-bunker.com/transfer/TFautosize.jpg
I would expect the TextField to autoresize to the size of the text - and not
have that extra space on the right.

Or I am missing something?


Regards


Karim


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Karim
Beyrouti
Sent: 10 October 2008 14:49
To: 'Flash Coders List'
Subject: [Flashcoders] TextField - autoSize

Hi List, I seem to be having issues getting my textfield to autoResize - and
I am sure this is just me being silly. 
This is my code:

<code>
import flash.text.TextField;
import flash.text.TextDisplayMode;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormatAlign;
import flash.text.StyleSheet;
import flash.text.TextFormat;

var txt                 = new TextField()
addChild( txt );

txt.autoSize    = TextFieldAutoSize.LEFT;
txt.wordWrap    = true;
txt.selectable  = true;
txt.multiline   = true;
txt.border              = true;
//txt.width             = 20;

var txtF                = new TextFormat();
txtF.color              = "0xFF00FF";
txtF.align              = TextFormatAlign.LEFT;

txt.text                = "MY TEXT";
txt.setTextFormat(txtF);

</code>

Any thoughts?



Kind Regards



Karim 

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to