htmlText Question

Hi Everyone. What seems to be a simple string assignment has become a real head scratcher for me. Hope someone can help me.

I create various movieClips with TextFields in them using the following function.

function AddLabel(Label,L) // create a MovieClip with a Text Field.
{
obj = this.createEmptyMovieClip(“mc” + L,L);

var tf = new TextFormat();

tf.font = “Arial”;
tf.size = 12;
tf.color = ColorDarkGray;
obj.createTextField(“txt”,L,0,0,380,500);

obj.txt.maxChars = 500;
obj.txt.autoSize = true;
obj.txt.wordWrap = true;
obj.txt.selectable = true;
obj.txt.embedFonts = true;
obj.txt.html = true;
obj.txt.setNewTextFormat(tf);
obj.txt.text = Label;

return obj;
}

Lets say that I use the above function with the following statement:

JimMC = AddLabel(“JimVision”,1);

Then I try to assign a string to the above movieClip with some embedded html like so:

JimMC.txt.htmlText = “This is my test < a href=‘http://bogus.com’>link</ a>.”;

When I try to run the above the results come out blank. When I list my variables I do see that my TextField is being assign the text and html code. What I also notice is that the textWidth and textHeight value become zero.

Does anyone know why my results are blank? Why do the textWidth and textHeight values become zero?

Thank You

JimVision