# Dynamic text formatting problem

**URL:** <https://forum.kirupa.com/t/dynamic-text-formatting-problem/180848>\
**Category:** Uncategorized\
**Created:** [March 3, 2006, 8:59pm UTC](https://forum.kirupa.com/t/dynamic-text-formatting-problem/180848 "2006-03-03T20:59:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pbrollwitme](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@pbrollwitme](https://forum.kirupa.com/u/pbrollwitme)\
**Post date:** [March 3, 2006, 8:59pm UTC](https://forum.kirupa.com/t/dynamic-text-formatting-problem/180848/1 "2006-03-03T20:59:42Z")

</div>

hey all,  
I’m wondering why the formatting isn’t being applied to the text i’ve loaded from an xml file:

listenerObject3 = new Object();  
listenerObject3.change = function() {  
value1 = categorycb.value;  
category\_xml = new XML();  
category\_xml.load(value1);  
category\_xml.ignoreWhite = true;  
category\_xml.onLoad = function() {  
var howMany:Array = new Array();  
howMany = this.firstChild.childNodes;  
if (howMany.length\>0) {  
for (var i:Number = 0; i\<howMany.length; i++) {  
var currentLink = howMany\*;  
var currentLink\_mc = textloader.createEmptyMovieClip(“links”+i, i);  
var currentLink\_mc2 = currentLink\_mc.createTextField(“my\_txt”+i, 3, 0, 0, 500, 30);  
currentLink\_mc.\_y = i\*thumb\_spacing;  
var my\_fmt:TextFormat = new TextFormat();  
this.currentLink\_mc2.multiline = true;  
this.currentLink\_mc2.wordWrap = true;  
this.currentLink\_mc2.color = 0xFF0000;  
this.currentLink\_mc2.selectable = false;  
currentLink\_mc2.setTextFormat(‘my\_fmt’);  
currentLink\_mc2.text = currentLink.attributes.business+’ ‘+’-’+’ '+currentLink.attributes.short;  
currentLink\_mc.link = currentLink.attributes.link;  
currentLink\_mc.onRelease = function() {  
getURL(this.link, “\_blank”);  
};  
}  
}  
};  
};

any suggestions??  
Thanks,  
Mat
