In an application, i am creating dynamic text Field and then try to rotate it by using _rotation method but it become invisible. Please answer if anyone know anything about it.
Thanks for your reply kglad.com
yes, you are right. but i have already tried this. Following is the sample of code that i am using.
even i have try to do this by another way also in which i have
1. plece a dynamic text field in a movieClip.
2. embed the fonts from the text field properties.
3. Then attach the movie clip on the _root.
4. Then i have given the rotation to the attached movieclip
this solve my problem to a large extent. but when i assign textFormat to the textField it again disappear.
Please let me know if there is any other solution for this.
if you don't see your text, you're not embedding the font.
when you use actionscript to embed a font, you need to have the font in your library with a linkage id, create a textformat instance and assign its font property and finally assign the textformat to your textfield. for example
var tfor:TextFormat=new TextFormat();
tfor.font="yourfontslinkageid"; // <- linkage id of font in your library
I'm having the same problem, but now understand why this happens.
As a test if you create a dynamic text box and place a var inside - it works.
Then if you manually rotate the text field it can't see the text anymore. Or when you dynamicaly rotate etc.
A fix will be to place the text field inside a movieclip, then rotate the movieclip with the text field inside.