Thanks guys :) works perfectly.

Now it seems my line returns ("\r") aren't being recognised (they show up in the textfield).

Anyone got any ideas whats going on?


On 7 May 2008, at 18:19, Robert Leisle wrote:

Hi Alistair,

Try adding this to your code:
tmpField.wordWrap = true;


-----Original Message-----
[mailto:[EMAIL PROTECTED] On Behalf Of Alistair
Sent: Wednesday, May 07, 2008 10:03 AM
To: Flash Coders List
Subject: [Flashcoders] Why isn't my TextField multiline? AS2

Hi there, thanks for checking this.

I'm generating a textfield from within a custom class but I can't
seem to make it multiline, I can see the border of the textfield is
the right size my text only appears on the first line and also my
carriage returns "\r" are having no effect.
I've tried a number of options for properties of the textfield but I
cant seem to get it to work.

Any suggestions thankfully received this is taking lots of time for a
simple thing!

Here's the code from within my class:

                        var oline:MovieClip = mainMC.monkey.bubble.outline
                        var tmpBox:MovieClip =
("text_mc", 1);
                        var tmpField:TextField =
tmpBox.createTextField("my_txt", 1,
oline._x, oline._y, oline._width, oline._height);
                        tmpField.selectable = false;
                        tmpField.border = true;
                        tmpField.embedFonts = true;
                        tmpField.type = "dynamic";
                        tmpField.multiline = true;      
                        tmpField.text = Q.monkeyStr;
Flashcoders mailing list

Flashcoders mailing list

Flashcoders mailing list

Reply via email to