Ultrashock Forums > Flash > Flash Professional
Embedded Fonts

You are currently viewing our website as a guest which gives you limited access to forums, files and other resources.

Click here to join now for free, and start interacting with our members, download files and much more!

Click here if you are looking for our Flash files and other professional assets.
 
Post Reply | View first unread | Rate Thread Search this Thread | Thread Tools | Display Modes

#1
Bookmark and Share!
Embedded Fonts
Old 2008-11-05

Has anyone experienced this phenomenon with embedded text library assets?

I have a Font symbol in my library set to a font of my choosing. We'll say Arial
Linkage identifier named "myArial"

Is it true that once you specify a font in the Library assets for a TextField, that some of actionscript properties for TextFormat become null?

Code:
var my_fmt:TextFormat = new TextFormat();
my_fmt.bold = true;
my_fmt.font = "myArial";
my_fmt.color = Math.random()*0xffffff;
my_fmt.size = 30;

this.createTextField("my_txt", this.getNextHighestDepth(), Stage.width*0.5, Stage.height*0.5, 500, 200);
my_txt.selectable = false;
my_txt.embedFonts = true;
my_txt.text = "Hello world";
my_txt.setTextFormat(my_fmt);
What do you want to build today?
postbit arrow 1 comment | 211 views postbit arrow Reply: with Quote   
Registered User
3D man is offline
seperator
Posts: 785
2001-07-29
Age: 36
3D man lives in United States
seperator

Ultrashock Member Comments:
Nutrox's Avatar Nutrox Nutrox is offline Nutrox lives in United Kingdom 13 Creative Assets 2008-11-05 #2 Old  
You don't use the linkage ID for fonts, you use the actual font name. Font linkage IDs are pretty irrelevant really.

Code:
my_fnt.font = "Arial";
If embedFonts is true Flash looks in the SWF for the font, otherwise it looks in OS directories. Not sure about some of TextFormat properties becoming null, I have never noticed anything strange happening with that.
Reply With Quote  
Thread Tools
Display Modes Rate This Thread
Rate This Thread: