Problems with text alignment and CSS decoration

Hello! I run into a problem trying to create a text in Flash.

If I create a dynamic textfield on the stage in Flash itself and try to align it with ‘justify’, the text is sometimes aligned correctly, but sometimes aligned ‘left’. I use:


var tf=new TextFormat();
tf.align="justify";
this.mytext.setNewTextFormat(tf);

There doesn’t seem to be a pattern in when the text is aligned correctly and when it keeps stuck to the left. This only seems to happen when I create a textfield directly on stage. If I create the textfield with ActionScript using createTextField, the text will always be aligned properly.

However, the other problem is: when I create a textfield using createTextField in ActionScript all goes well, I see the text and it is embedded in the library. But when I try to use a (very simple) CSS decoration on it, the text immediately disappears. How come?

Due to these 2 problems I never have a satisfying solution: I either place the textfield directly on the stage, in which case the CSS decoration DOES work but the justified alignment DOESN’T (not always). Or I create the textfield by ActionScript and the justified alignment works always but I can’t use CSS decoration.

Please help!