Copy link to clipboard
Copied
Hello, I hope someone can help me.
textField.rotation don't work !
in Animate Air IOS .
Also on Ipad there isn't Comic Sans lettertyp in TextField.
On other places there's no problem.
I have include Comic Sans MS in library, actionscriptname:ComicSansMS.
Below my code:
format1.font="ComicSansMS";
format1.size=30;
format1.bold=true;
_scoreField.border=false;
_scoreField.width = 50;
_scoreField.height = 50;
_scoreField.x=190;
_scoreField.y=343;
_scoreField.autoSize = TextFieldAutoSize.CENTER;
_scoreField.rotation=90;
_scoreField.defaultTextFormat=format1;
_scoreField.text = String(0);
addChild(_scoreField);
The number is invisible;
when i remove "_scoreField.rotation=90;" code, it is visible but not with rotation.
Thanks in advance!
Hi.
Adapting the example from this link: ActionScript - Rotating Text .
...import flash.text.Font;
import flash.text.TextFormat;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
var format1:TextFormat;
var _scoreField:TextField;
var enumerableFonts:Array = Font.enumerateFonts(false);
format1 = new TextFormat();
format1.font = "ComicSansMS";
format1.size = 30;
format1.bold = true;
format1.font = enumerableFonts.length > 0 ? enumerableFonts[0]["fontName"] : "There are no embedded fonts.";
_scoreFi
Copy link to clipboard
Copied
Normally, anytime you start rotating a dynamic textfield you need to embed the font in it.
Copy link to clipboard
Copied
Thank you Ned for the reply. Yes i have embedded the font of course.
And give it an actionscript name;
It is a device font. maybe was it important to say that about it.
Copy link to clipboard
Copied
Hi.
Adapting the example from this link: ActionScript - Rotating Text .
import flash.text.Font;
import flash.text.TextFormat;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
var format1:TextFormat;
var _scoreField:TextField;
var enumerableFonts:Array = Font.enumerateFonts(false);
format1 = new TextFormat();
format1.font = "ComicSansMS";
format1.size = 30;
format1.bold = true;
format1.font = enumerableFonts.length > 0 ? enumerableFonts[0]["fontName"] : "There are no embedded fonts.";
_scoreField = new TextField();
_scoreField.embedFonts = true;
_scoreField.defaultTextFormat = format1;
_scoreField.border = false;
_scoreField.width = 50;
_scoreField.height = 50;
_scoreField.x= 190;
_scoreField.y= 343;
_scoreField.autoSize = TextFieldAutoSize.CENTER;
_scoreField.rotation = 90;
_scoreField.text = String(0);
addChild(_scoreField);
I hope it helps.
Regards,
JC
Copy link to clipboard
Copied
Thank you very much for the reply i will study it.
Copy link to clipboard
Copied
Yes it works!!
Thanks a lot!!
Copy link to clipboard
Copied
Excellent!
You're welcome!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now