View Full Version : TextInput with rotation doesn't display text
10-24-2007, 06:37 PM
It seems that if you have a TextInput (or TextArea) component and rotate it, the text stops displaying. Anyone know anything about this? Is there a trick or work-around if you want to use one of these but rotate it?
10-24-2007, 06:51 PM
Have you embedded the font?
10-24-2007, 09:26 PM
No, I haven't embedded the font.
But it's a font that I have on my machine. I can rotate static text that is using the same font and there is no problem.
if it is a dynamic text box, you will need to embed the font.
10-24-2007, 10:02 PM
Huh, strange... only if it's rotated? 'Cause it works fine without the embedded font with a non-rotated component.
I embedded the font and it's still not working. Do I need to explicitly reference the embedded font in the TextFormat of the component somehow? What do I reference there - the symbol name, export class name, what?
10-24-2007, 10:10 PM
Huh, I still cannot get it to work. I created a Font symbol in the library. It is exported to ActionScript and I'm passing the exported name to a TextFormat as the font name.
Does it have to have runtime sharing enabled or something? Which would be obnoxious since I just want to use it from within the same FLA. Can I somehow share it to itself?
10-25-2007, 03:36 AM
Okay... I figured out how to do this with straight-up dynamic text added with the text tool. Setting the embed on its properties there works as you all have suggested.
I still can't figure out exactly which hoops to jump through to get it to work for the text field that lives inside a TextInput or TextArea component, though. Actually I think the standalone input text object should be good enough for my purposes, but I'm still curious about how to set it up with a component - is it possible?
10-25-2007, 04:33 AM
You can do it in the same manner with a TextInput component, i.e. with an off-stage textfield (unseen), in which you'll embed the same font used in the component...
myInput.fontFamily = "Courier New";
myInput.fontWeight = "bold";
myInput.embedFonts = true;
myInput.fontSize = 20;
myInput._rotation = -90;
11-18-2007, 08:05 AM
Hi, see my post on rotating text without embedding fonts:
The idea is very simple: A text rendering component (Label, in my post) automatically renders itself as a bitmap, and draws the bitmap back onto itself. Since the component is rotated, the bitmap will be rotated as well.
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.