Thanks for your reply Chistoffer, I'm afraid it's still not working,
the characters appear in my text field.
Here's the code I am using to create the text format and textfield,
maybe something here is screwing it up:
var myM:TextFormat = new TextFormat();
myM.align = "center";
myM.font = "Serifa Blk BT";
myM.size = 20;
myM.color = 0x000000;
myM.leading = -5;
myM.letterSpacing = -1;
//add text to boxes
var oline:MovieClip = mainMC.monkey.bubble.outline
var tmpBox:MovieClip = mainMC.monkey.bubble.createEmptyMovieClip
("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.wordWrap = true;
tmpField.text = Q.monkeyStr;
tmpField.setTextFormat(myM);
Any suggestions flashers?
On 8 May 2008, at 10:06, Christoffer Enedahl wrote:
Try "\n" or "\r\n"
HTH/Christoffer
Alistair Colling skrev:
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?
Cheers
On 7 May 2008, at 18:19, Robert Leisle wrote:
Hi Alistair,
Try adding this to your code:
tmpField.wordWrap = true;
Hth,
Bob
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Alistair
Colling
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!
Cheers,
Ali
Here's the code from within my class:
var oline:MovieClip = mainMC.monkey.bubble.outline
var tmpBox:MovieClip =
mainMC.monkey.bubble.createEmptyMovieClip
("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;
tmpField.setTextFormat(myM);
_______________________________________________
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
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
--------------------------------------------------------------------------
Alistair Colling
Interactive Developer
FPP Brand Communications (Newcastle upon Tyne)
The Courtyard
Dinsdale Place
Sandyford
Newcastle upon Tyne NE2 1BD
Telephone: +44 (0)191 261 6662
Fax: +44 (0)191 233 2511
This transmission is confidential and intended solely for the person or
organisation to whom it is addressed.
It may contain privileged and confidential information. If you are not the
intended recipient, you should not
copy, distribute or take any action in reliance on it. If you have received
this transmission in error, please
notify the sender at the e-mail address above.
FPP Design Limited. Reg. Office: The Courtyard, Dinsdale Place, Sandyford, Newcastle upon Tyne NE2 1BD.
Registered Number 3775564. Registered in England and Wales. Visit our website at http://www.fpp.net/
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders