Dynamic text box / xml content - text is too close to border of text box

Hi,

If you take a look at my flash movie you will see that I have draggable movie clips, which contain dynamic text fields. These text fields contain text drawn in from a simple xml document.

The problem I have is that the text in the text fields is hedged right next to the border of the autosized text box. This makes them look untidy and in the worst case difficult to read. I wonder how I can add some margin to the left and right of the text to fill in some space.

http://www.nottingham.ac.uk/home/cczmdh/public_html/task1.2/dragAndDrop3.1.swf

http://www.nottingham.ac.uk/home/cczmdh/public_html/task1.2/dragAndDrop3.1.fla
(you also need the xml doc at : http://www.nottingham.ac.uk/home/cczmdh/public_html/task1.2/activityDescriptions.xml )

The code which formats the text boxes is:

with (main[“dragAct”+i].dragActText) {
text = actText[i+1];
background = true;
backgroundColor = “0xe2e2e2”;
setTextFormat(myFormat);
autoSize = “center”;
border = true;
borderColor = “0x666699”;
}

my text formatting looks like this, and you can see that I have tried to use leftMargin / rightMargin but these properties don’t seem to work:

var myFormat:TextFormat = new TextFormat(“Tahoma”, 12);
myFormat.leftMargin = 20;
myFormat.rightMargin = 20;
myFormat.bold = true;

Any suggestions most welcome.

Thanks