Dynamic TextField rotation

Hello

I have a dynamic textfield in which I am displaying the contents when a user clicks a button. Now everything is working fine and the text is being diplayed inside the textfield but If I rotate the textfield then the text does not appear at all. Any suggestions?

Hey adnan794

did you embed the font?

try to search the forum, you will find a lot of threads about this topic.

Hello mate

Yes I did embed the font hmm cant seem to figure out whats going wrong here

thanks

Did you set embedFonts = true?

Maybe if you could post your code, or a .fla it might help to clearify.

I found also this link: http://www.kirupa.com/forum/archive/index.php/t-262770.html
maybe it helps.

Hello Thanks for your reply. I did embed the fonts its not working still but I came to know one strange thing. The font I am using at the moment is Comic Sans MS if I use this font to rotate its not working but If I change the font to Times new Roman the rotation works. ANy ideas why this might be?

Are u sure which font u have embedded?

I am not sure how many ways are there to embed but what I am doing is selecting embed fonts from the property inspector in FlashIDE and then selecting the first four options which says A-Z, a-z, 0-9.

You have probably not embedded the font the right way.
Times New Roman works for you because it is the default font when embedding fonts.

Embedding fonts is way more complicated than it should be, but if you follow a guide and go through every step thoroughly you will hopefully eventually get it to work.
The built-in help in flash (press F1) is a good start.

Try once more, and then post your code if you need help!

**Edit:
**On second thought:
If you’re working with your textfield directly on the stage in the IDE, then that’s another story and not as complicated at all.

You will have to embed ALL characters that you will be using though.
If you use ANY other characters than the ones you specified when embedding, it won’t work.
So in your case, if you selected A-Z, a-z and 0-9, and you somewhere have a question mark in your text, you’ll get a non-embedded text.

To be on the safe side, I usually choose “Latin-1” and then add any other foreign letters I might be using in the little input box below.

Go see if that helps.
Good luck =)

Thanks for that I will start working on that and will let you know if i do any progress

example occupies 1.34 byte
http://kind-armadillo.pochta.ru/flash/Rotationtext.swf

central idea
myBitmapData.draw(my_text);


//first frame code
var my_text:TextField = new TextField();
my_text.text = "bitmap text";
var  format = new TextFormat();
with(format){color = 0x111111;size = 25;font = "Arial";}
my_text.autoSize = TextFieldAutoSize.LEFT;
my_text.defaultTextFormat = format;
my_text.selectable = false;
my_text.mouseEnabled = true;
//my_text.border=true;
my_text.multiline=true;
//my_text.htmlText = "<b>BOLD</b>";
//my_text.x=-my_text.width/2;
my_text.wordWrap=true;
my_text.width=550;

my_text.text="THIS
MEGA
GOOD!!!\HI!!!
FROM ALEX!";

var myBitmapData:BitmapData;
var bmp:Bitmap;

myBitmapData = new BitmapData(550, 400);
bmp= new Bitmap(myBitmapData);
myBitmapData.draw(my_text);
bmp.alpha=1;

var square:Sprite = new Sprite();
square.graphics.beginFill(0xFFFFFF);
square.graphics.drawRect(0, 0, 550, 400);
square.graphics.endFill();

var text_square:Sprite = new Sprite();
text_square.addChild(bmp);
addChild(text_square);
function change_text(my_str:String)
{
my_text.text=my_str;
myBitmapData.draw(square);
myBitmapData.draw(my_text);
}

var cadr_count:int;
var my_mega_sting:String;
var i:int;
bmp.x=-250;
bmp.y=-200;
text_square.x=250;
text_square.y=200;
addEventListener(Event.ENTER_FRAME, eventHandler);
dispatchEvent(new Event(Event.ENTER_FRAME));
function eventHandler(event:Event):void {
cadr_count++; if (cadr_count>360) cadr_count=0;	my_mega_sting="";
for (i=0;i<500;i++) my_mega_sting=my_mega_sting+" "+cadr_count+";";
change_text(my_mega_sting);
text_square.rotation=cadr_count;
}

additional reading
http://dnadillo.dn.ua/mur_gallery/ac3FLA/star_war.swf
http://dnadillo.dn.ua/mur_gallery/ac3FLA/star_war.rar