# XML, part of text doesn't wrap

**URL:** <https://forum.kirupa.com/t/xml-part-of-text-doesnt-wrap/151088>\
**Category:** flash\
**Created:** [June 13, 2005, 8:17am UTC](https://forum.kirupa.com/t/xml-part-of-text-doesnt-wrap/151088 "2005-06-13T08:17:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerryj](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@jerryj](https://forum.kirupa.com/u/jerryj)\
**Post date:** [June 13, 2005, 8:17am UTC](https://forum.kirupa.com/t/xml-part-of-text-doesnt-wrap/151088/1 "2005-06-13T08:17:02Z")

</div>

Hello again,

I am having this weird problem when I load an XML document. The last part of the text doesn’t ‘wrap’, if that is the proper english expression; the lines don’t go to the next line they just get lost. You can see what I mean in this link, by clicking on the Kaiser Chiefs item/photo/text, and then scroll down in the article.  
However, when you go back to home and do it again, the text looks allright! But that is too late of course.

[link](http://www.jeffwinder.nl/main2.html)  
[AS]  
function makeArtikel(txt, a, b, c) {  
var my\_xml = new XML();  
my\_xml.ignoreWhite = true;  
my\_xml.onLoad = function(ok) {  
if (ok) {  
var field = NK1MC.NK1;  
field.multiline = true;  
field.wordWrap = true;  
field.autoSize = true;  
field.selectable = false;  
field.html = true;  
field.htmlText = this.firstChild.childNodes[a].firstChild.nodeValue;  
field.setTextFormat(NK1fmt);  
var field = NT1MC.NT1;  
field.multiline = true;  
field.wordWrap = true;  
field.autoSize = true;  
field.selectable = false;  
field.html = true;  
field.htmlText = this.firstChild.childNodes\*\*.firstChild.nodeValue;  
field.setTextFormat(NT1fmt);  
NT1MC.\_y = NK1MC.\_y+NK1MC.\_height+30;  
NT1MC.\_x = NK1MC.\_x;  
// THIS IS THE PART WHERE THE WRAP GOES WRONG:  
var field = NA1MC.NA1;  
field.multiline = true;  
field.wordWrap = true;  
field.autoSize = false;  
field.selectable = false;  
field.html = true;  
field.htmlText = this.firstChild.childNodes[c].firstChild.nodeValue;  
field.setTextFormat(NA1fmt);  
NA1MC.\_x = NK1MC.\_x;  
NA1MC.\_y = NFMC.\_y+NFMC.\_height+25;  
initialization = {\_targetInstanceName:“NA1”, horizontal:false};  
NA1MC.attachMovie(“UIScrollBar”, “myScrollbar”, 1, initialization);  
NA1MC.myScrollBar.\_x = NA1MC.\_width+20;  
field.maxscroll = 16;  
}  
}; {/AS]

I am using \<![CDATA[]]\> in the XML document.

Does anyone have a clue? I never had this with loading .txt files.

Thank you,

Jerryj.
