# Html from xml & no resize field?

**URL:** https://forum.kirupa.com/t/html-from-xml-no-resize-field/202934
**Category:** Uncategorized
**Created:** [October 5, 2006, 9:59pm UTC](https://forum.kirupa.com/t/html-from-xml-no-resize-field/202934 "2006-10-05T21:59:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![plankguy](https://avatars.discourse-cdn.com/v4/letter/p/43a26b/32.png) [@plankguy](https://forum.kirupa.com/u/plankguy)
#### Post date: [October 5, 2006, 9:59pm UTC](https://forum.kirupa.com/t/html-from-xml-no-resize-field/202934/1 "2006-10-05T21:59:25Z")

</div>

I’m having (what seems to be) a strange issue when setting a text field to auto resize. I’m grabbing some content (HMTL formatted) from an xml doc, but when I add autoSize = true; i get an object rather then my text:

```
ActionScript Code:
[FONT=Courier New][LEFT]line_txt.[COLOR=#0000FF]multiline[/COLOR] = [COLOR=#000000] **true** [/COLOR];

```

line\_txt.[COLOR=#0000FF]wordWrap[/COLOR] = [COLOR=#000000] **true** [/COLOR];  
line\_txt.[COLOR=#0000FF]autoSize[/COLOR] = [COLOR=#000000] **true** [/COLOR]; [COLOR=#808080]_// when removed, works but I need resizing_[/COLOR]  
line\_txt.[COLOR=#0000FF]selectable[/COLOR] = [COLOR=#000000] **false** [/COLOR];  
line\_txt.[COLOR=#0000FF]html[/COLOR] = [COLOR=#000000] **true** [/COLOR];

[COLOR=#000000] **function** [/COLOR] loadXMLCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
[COLOR=#0000FF]if[/COLOR] COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
line = [COLOR=#0000FF]this[/COLOR].[COLOR=#0000FF]firstChild[/COLOR].[COLOR=#0000FF]childNodes[/COLOR][COLOR=#000000][[/COLOR][COLOR=#000080]0[/COLOR][COLOR=#000000]][/COLOR].[COLOR=#0000FF]firstChild[/COLOR].[COLOR=#0000FF]nodeValue[/COLOR];  
root.[COLOR=#000080]line\_txt[/COLOR].[COLOR=#0000FF]htmlText[/COLOR] = line+[COLOR=#FF0000]""[/COLOR];  
[COLOR=#000000]}[/COLOR] [COLOR=#0000FF]else[/COLOR] [COLOR=#000000]{[/COLOR]  
[COLOR=#0000FF]trace[/COLOR][COLOR=#000000]([/COLOR][COLOR=#FF0000]“file not loaded!”[/COLOR][COLOR=#000000])[/COLOR];  
[COLOR=#000000]}[/COLOR]  
[COLOR=#000000]}[/COLOR]  
xmlData = [COLOR=#000000] **new** [/COLOR] [COLOR=#0000FF]XML[/COLOR]COLOR=#000000[/COLOR];  
xmlData.[COLOR=#0000FF]ignoreWhite[/COLOR] = [COLOR=#000000] **true** [/COLOR];  
xmlData.[COLOR=#0000FF]onLoad[/COLOR] = loadXML;  
xmlData.[COLOR=#0000FF]load[/COLOR]COLOR=#000000[/COLOR];  
[/LEFT]  
[/FONT]

Eveything works fine if I take the line “line\_txt.autoSize = true;”, i get the desired effect however I need my text field to resize!!

Here’s my XML if it helps:

```auto

<?xml version="1.0" encoding="UTF-8"?>
<chat>
    <line milleseconds="1000"><![CDATA[This would be the first line of text. <br />As you can see, there's <b>a lot</b> of text to be dealt with!]]></line>
    <line milleseconds="2000"><![CDATA[This would be the <br />second line of text.]]></line>
    <line milleseconds="3000"><![CDATA[This would be the <br />third line of text.]]></line>
</chat>

```

Help!
