Share Posted January 9, 2013 Hi, I'm having a problem transforming a text field. When i move or scale the text field everything is fine, but when i rotate it, the text disappears. This is how i'm creating and adding the text field: //Create the text format var textFormat: TextFormat = new TextFormat(); textFormat.size = DEFAULT_TEXT_SIZE; textFormat.align = DEFAULT_TEXT_ALIGN; textFormat.font = DEFAULT_TEXT_FONT; //Create the text field var textField: TextField = new TextField(); textField.width = DEFAULT_TEXT_WIDTH; textField.height = DEFAULT_TEXT_HEIGHT; textField.x = (mc_stage.width - textField.width) / 2; textField.y = (mc_stage.height - textField.height) / 2; textField.type = "input"; textField.multiline = true; textField.wordWrap = true; textField.defaultTextFormat = textFormat; textField.text = "Ingresa tu texto aquí..."; //Add the field to the parent moveiclip mc_stage.addChild(textField); //Add the field to the transform manager var transItem: TransformItem = _transManager.addItem(textField); transItem.constrainScale = false; _transManager.selectItem(textField); Any idea of what may be happening? Tank you. Link to comment Share on other sites More sharing options...
Author Share Posted January 9, 2013 Also, when i get back to 0 rotation the text re appears. Link to comment Share on other sites More sharing options...
Share Posted January 9, 2013 That's just a Flash limitation - you MUST embed fonts properly in the TextField for it to be able to be rotated. Once you embed your fonts, it should work fine. Check Adobe's docs or Google for instructions on embedding fonts. 1 Link to comment Share on other sites More sharing options...
Author Share Posted January 9, 2013 I see, thank you for your answer. I embedded the Helvetica font in the .fla with the same name (Helvetica), but the text still disappears. Am i missing something? Link to comment Share on other sites More sharing options...
Author Share Posted January 9, 2013 Just solve it, forgot to add textField.embedFonts = true; . Thank you for your help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now