# Multiple paragraphs and HTML text in AS3.0

**URL:** <https://forum.kirupa.com/t/multiple-paragraphs-and-html-text-in-as3-0/224542>\
**Category:** flash\
**Created:** [May 3, 2007, 6:51am UTC](https://forum.kirupa.com/t/multiple-paragraphs-and-html-text-in-as3-0/224542 "2007-05-03T06:51:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dthought](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/dthought/32/3573_2.png) [@dthought](https://forum.kirupa.com/u/dthought)\
**Post date:** [May 3, 2007, 6:51am UTC](https://forum.kirupa.com/t/multiple-paragraphs-and-html-text-in-as3-0/224542/1 "2007-05-03T06:51:45Z")

</div>

Hi everyone,

'Tis my first post here on Kirupa. I’ve been coding in Flash since Flash 4’s pre-ActionScript language, and whilst I pretty much had AS1.0 down pat and half-paid attention to AS2.0 where possible, AS3.0 is giving me a good chance to relearn a lot of stuff. Naturally, I’m running into problems.

At the moment, I’m battling with Text Fields, specifically with multiline paragraphed HTML text that is dynamically created. In my example, I create one TextField programmatically, and I have a second which I have placed, sized and named manually.

Here is my code:

```auto

import flash.text.TextField;
function testTextField ()
{
 var myTextField:TextField = new TextField();
 
 myTextField.htmlText = "<p><b>Paragraph 1</b></p><p>Paragraph 2</p>";
 myTextField.autoSize = TextFieldAutoSize.LEFT;
 myTextField.multiline = true;
 
 stage.addChild(myTextField);
}
testTextField();
placedBox.htmlText = "<p>Paragraph 1</p><p>Paragraph 2</p>";

```

Unless I add in line breaks (

) into the htmlText between the p tags, Flash will not break lines as expected. However, the htmlText for the placed text box works properly.

Am I missing something?

Cheers,

Mike
