# TextFormatting dissappears when going backwards in timeline

**URL:** https://forum.kirupa.com/t/textformatting-dissappears-when-going-backwards-in-timeline/268517
**Category:** flash
**Created:** [August 14, 2008, 8:36pm UTC](https://forum.kirupa.com/t/textformatting-dissappears-when-going-backwards-in-timeline/268517 "2008-08-14T20:36:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![3rdivision](https://avatars.discourse-cdn.com/v4/letter/3/7ab992/32.png) [@3rdivision](https://forum.kirupa.com/u/3rdivision)
#### Post date: [August 14, 2008, 8:36pm UTC](https://forum.kirupa.com/t/textformatting-dissappears-when-going-backwards-in-timeline/268517/1 "2008-08-14T20:36:08Z")

</div>

Hi Kirupers,

I’ve got a strange glitch goign on in one of my flash files. I load a set of menu items from xml and format their text using TextFormat at the time of loading. This works great until I start jumping around in the timeline. Working forwards in time it maintains its formatting, but if I jump backwards at all, it loses its alignment and defaults to Left Side. Can anyone help me?

//create the function that will load the xml info into the dynamic menu text  
function CreateMenu(side\_xml){  
//makes the xml file easier to navigate  
var titles = side\_xml.firstChild.childNodes;  
//set up the text formatting options  
var txt\_fmt:TextFormat = new TextFormat();  
txt\_fmt.align = “center”;  
//loop to load the xml data into the button text fields using buttonRa  
for (var i=0; i\<titles.length; i++) {  
if (titles\*.attributes.name == “Empty”) {  
titleRa\*.text = “”;  
trace (“empty value loaded”);  
}  
else {  
titleRa\*.text = titles\*.attributes.name;  
titleRa\*.setTextFormat (txt\_fmt);  
//trace (title\*);  
trace(“loaded Node Value” + i);  
}  
}  
}
