# Help! Why is the dynamic textfield is stacking the xml text?

**URL:** https://forum.kirupa.com/t/help-why-is-the-dynamic-textfield-is-stacking-the-xml-text/324900
**Category:** flash
**Created:** [September 14, 2011, 6:43pm UTC](https://forum.kirupa.com/t/help-why-is-the-dynamic-textfield-is-stacking-the-xml-text/324900 "2011-09-14T18:43:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mediaworksnw](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@mediaworksnw](https://forum.kirupa.com/u/mediaworksnw)
#### Post date: [September 14, 2011, 6:43pm UTC](https://forum.kirupa.com/t/help-why-is-the-dynamic-textfield-is-stacking-the-xml-text/324900/1 "2011-09-14T18:43:43Z")

</div>

New to as3 … Do anyone know what causes a dynamic text field to display text in stacking order?

(example)

s  
ta  
c  
k  
i  
n  
g

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ this is my code \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
var myXML:XML = new XML;  
var myLoader:URLLoader = new URLLoader();  
myLoader.load(new URLRequest(“BodyShop.xml”));  
myXML.ignoreWhite = false;

myLoader.addEventListener(Event.COMPLETE, processXML);  
function processXML(e:Event):void {  
myXML = new XML(e.target.data);  
var ShopArea:XMLList=myXML.TR.AreaHeader.text();  
var ItemContent:XMLList = myXML.TR.ShopAreaInfo.text();  
shopHeader.htmlText=ShopArea.toString();  
descriptionArea.htmlText = ItemContent.toString();  
}

overlay\_tf.closeOverlay.addEventListener(MouseEvent.CLICK, retractOL);  
function retractOL (me:MouseEvent):void {  
var overlayTM:TransitionManager=new TransitionManager(overlay\_tf);  
overlayTM.startTransition({type:Fly, direction:Transition.OUT, duration:1});  
overlayTM.addEventListener(“allTransitionsOutDone”, hideOL);  
}  
function hideOL(e:Event): void {  
setChildIndex(overlay\_tf,0);  
}  
btn\_4.addEventListener(MouseEvent.CLICK, btn4);  
function btn4(event:MouseEvent):void {  
var ShopArea:XMLList=myXML.TR.AreaHeader.text();  
var outsideArea:XMLList = myXML…Obj\_number.(@description == “4”).ObjTag.text();  
var ItemContent:XMLList = myXML…Obj\_number.(@description == “4”).ObjInfo.text();  
shopHeader.htmlText=ShopArea.toString() + outsideArea.toString();  
descriptionArea.htmlText = ItemContent.toString();  
descriptionArea.addEventListener(TextEvent.LINK, tf\_4a);  
}

function tf\_4a():void {  
setChildIndex(overlay\_tf,10);  
TransitionManager.start(overlay\_tf,{type:Fly, direction:Transition.IN, duration:1})  
var tfArea:XMLList = myXML…Obj\_number.(@description == “4a”).ObjInfo.text();  
overlay\_tf.subDescriptionArea.htmlText = tfArea.toString();  
}
