Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

textField.rotation don't work in Animate Air IOS

Explorer ,
Mar 21, 2018 Mar 21, 2018

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!

TOPICS
ActionScript
912
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 21, 2018 Mar 21, 2018

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

...
Translate
LEGEND ,
Mar 21, 2018 Mar 21, 2018

Normally, anytime you start rotating a dynamic textfield you need to embed the font in it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 22, 2018 Mar 22, 2018

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2018 Mar 21, 2018

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 22, 2018 Mar 22, 2018

Thank you  very much for the reply i will study it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 22, 2018 Mar 22, 2018

Yes it works!!

Thanks a lot!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 22, 2018 Mar 22, 2018
LATEST

Excellent!

You're welcome!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines