# Rotate TextInput Component

**URL:** <https://forum.kirupa.com/t/rotate-textinput-component/288859>\
**Category:** flash\
**Created:** [May 21, 2009, 10:57pm UTC](https://forum.kirupa.com/t/rotate-textinput-component/288859 "2009-05-21T22:57:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jewelee](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/32.png) [@jewelee](https://forum.kirupa.com/u/jewelee)\
**Post date:** [May 21, 2009, 10:57pm UTC](https://forum.kirupa.com/t/rotate-textinput-component/288859/1 "2009-05-21T22:57:48Z")

</div>

Hi there;  
I have several textInput components on my stage and would like the user to be able to rotate them using a button.  
When the button is deployed, the textInput will rotate, but the text in the (textfield?) disappears. Here is some sample code. I have embeded a font called Font 1. And the textInput is called myTextInput.  
Thank you!

[LEFT][COLOR=#993300]var[/COLOR] myFormat = [COLOR=#993300]new[/COLOR] [COLOR=#993300]TextFormat[/COLOR]COLOR=#000000[/COLOR];  
myFormat.[COLOR=#993300]font[/COLOR] = [COLOR=#0000FF]“Font 1”[/COLOR];  
myFormat.[COLOR=#993300]size[/COLOR] = [COLOR=#000000]12[/COLOR];

myTextInput.[COLOR=#993300]textField[/COLOR].[COLOR=#993300]embedFonts[/COLOR] = [COLOR=#993300]true[/COLOR];  
myTextInput.[COLOR=#993300]textField[/COLOR].[COLOR=#000000]defaultTextFormat[/COLOR] = myFormat;

rotate\_button.[COLOR=#000000]addEventListener[/COLOR][COLOR=#000000]([/COLOR]MouseEvent.[COLOR=#000000]MOUSE\_DOWN[/COLOR], rotate[COLOR=#000000])[/COLOR];

[COLOR=#993300]function[/COLOR] rotateCOLOR=#000000[/COLOR]:[COLOR=#993300]void[/COLOR] [COLOR=#000000]{[/COLOR]  
myTextInput.[COLOR=#000000]rotation[/COLOR] = [COLOR=#000000]90[/COLOR];

[COLOR=#000000]}[/COLOR]  
[/LEFT]
