Embed fonts issue in runtime dynamic textfields

Hi All,

I have an issue about the italics when embedding the fonts in run-time dynamic text field. I am using CS4 and as3.

Here is my code:

var fontArial:Arial = new Arial();
var format:TextFormat = new TextFormat();

format.align=TextFormatAlign.LEFT;
format.font=fontArial.fontName;
format.italic=true;

var tf:TextField = new TextField();
tf.autoSize=TextFieldAutoSize.LEFT;
tf.defaultTextFormat = format;
tf.embedFonts = true;
tf.selectable = false;
tf.htmlText="<p><i>This is italic text</i>. This is normal text</p>";
//tf.setTextFormat(format)// I have tried setTextFormat too. But its not working either.
addChild(tf);

Its not working. The output is a plain text. I dont know how to embed italic and bold fonts all at a time in runtime dynamic textfield.

Please someone help me if its a known issue.

Thanks in advance

Regards,
Srinu