Numbered List in a text field

I’m trying to create the appearence of a numbered list in Flash as to the best of my knowledge you can’t easily create one using list tags in an HTML text box. I need to accomplish this in a way which will allow it to be easy for the list to be changed according to the contents of a database.

After a little bit of poking around I have come up with some simple code:


var bodyStyleSheet:Object = new TextField.StyleSheet();
bodyStyleSheet.setStyle("a:link", {color:'#FF9900'});
bodyStyleSheet.setStyle("a:hover", {color:'#FDD658'});
bodyStyleSheet.setStyle(".number", {color:'#FF9900'});
//	---
this.text_mc.field.html = true;
this.text_mc.field.styleSheet = bodyStyleSheet;
this.text_mc.field.htmlText = "<textformat indent='20'><span class='number'>1.</span></textFormat>";
this.text_mc.field.htmlText += "<textformat blockIndent='54'>	 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio. Duis fringilla commodo felis. Nunc id ligula vel mi interdum pulvinar. Proin scelerisque erat euismod nunc.</textformat><br><br>";
this.text_mc.field.htmlText += "<textformat indent='20'><span class='number'>10.</span></textFormat>";
this.text_mc.field.htmlText += "<textformat blockIndent='54'>	 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed odio. Duis fringilla commodo felis. Nunc id ligula vel mi interdum pulvinar. Proin scelerisque erat euismod nunc.</textformat>";

Now when the movieclip containing the text field is located at X=10, I achieve the effect that I want with the above code:

Fantastic, however when I move the movieclip containing the textfield to X=50, the text becomes misaligned:

I tried changing the tabStops but that didn’t seem to have any effect on the text what so ever. I am thinking that the tabstops are measured from the origin of the root movieclip but I can’t find any documentation to either confirm or disprove my theory.

Can any one shed some light on this for me?