Groups | Blog | Home
all groups > flash actionscript > april 2004 >

flash actionscript : Inbed fonts?


uberKill
4/6/2004 12:25:03 PM
The word is embed.
If the text is marked in the properties panel as static, then the characters
are already embedded.
If the text is marked as dynamic or input, then find the box in the properties
panel with the label "Character...".
Click on it and then check "all characters" to embed the font.
This can also be accomplished through AS; check the reference dictionary.

good luck!
Ed Massey
4/6/2004 7:09:00 PM
Embedding fonts using AS:
1/. =======================
Import a font into the library and give it a linkage name(right click) eg:
xtraFont1
and check "export for actionScript"

2/. =======================
in the first frame of _root:

myTextStyle = new textFormat();
with(myTextStyle){
font = "xtraFont1";// the linkage name you gave the font you imported
size = blah blah
color = blah blah
}

3/. =======================
in the movieClip where you want to create the text field:

createTextField("myTxtField",level,x,y,width,height);
with(myTxtField){
type = "static"; // or dynamic or input (or password);
embedFonts = true;
//....any other attributes you want to add eg (border,background,)
text = "I am too lazy to look this up :)"; // or a variable or
htmlText=....*
setTextFormat(_root.myTextStyle);

}

* if you use htmlText=blah, you must also set html = true;

hope this helps

Ed

Tinku31
4/6/2004 7:43:04 PM
other thing you can do with your fonts, thats is
select your font and press ctrl+b
... James Smith
4/6/2004 8:56:06 PM
How do i in flash mx ? I have a couple of fonts i need for a site that i
have downloaded but i dont know how to inbed fonts so they wont be of use?

Please Help

Thanks in advance

... James Smith
4/6/2004 11:56:44 PM
I cant seem to find it in the properties. What does use device fonts do?
My text is static and it doesnt embed the fonts. How do i do it through
actionscript what do i look for in the actionscript dictionary.

[quoted text, click to view]

Ed Massey
4/7/2004 9:14:21 AM
my pleasure!

... James Smith
4/7/2004 9:57:40 AM
Yeah but if ive tweened the text in any way the tween wont work anymore
right ?
But thats a good idea for non moving text. Thanks for that.

[quoted text, click to view]

... James Smith
4/7/2004 9:58:05 AM
Thanks heaps Ed
Really appretiate it.

[quoted text, click to view]

AddThis Social Bookmark Button