all groups > flash actionscript > september 2007 >
You're in the

flash actionscript

group:

Dynamic & Static TextField Embedded Font + CSS + HTML, please help


Dynamic & Static TextField Embedded Font + CSS + HTML, please help Big D0g
9/29/2007 6:01:08 AM
flash actionscript:
Hi Everyone;:confused;

ActionScript 3.0 + Flash 9

I'm having trouble with embedded fonts and dynamic textfields when static text
is on the stage using the same font.

From the many forums across the net, I've been able to figure out that the
problem has something to do with the fact that static text-fields embed the
font they are using, but only the characters used in the fields ... and that
when i style dynamic text using CSS, the font-family declaration picks up the
font embedded for the static fields instead of the one I added to the library.

What I'm doing seems to be pretty strait forward -- yet it just isn't
working... Someone please help.

Here's the test scenario:
in the library I've added a 'CG' font class of "Century Gothic" and exported
for actionscript in 1st frame;
on the stage are static textfields using "century gothic" (logo + nav)
on the stage is a dynamic textfield that loads simple html content from
external files: i.e. "<h1>title</h1><p>content</p>...",
this textfield is styled using a simple stylesheet 'h1 { font-family: "Century
Gothic"; font-size:16pt... } p { font-family: "Century Gothic"; font-size:
12pt;...} ...'
dynamic textfield.embedFonts = true;

= dynamic content doesn't show up at all.

If i change the css to use a different embedded font than the one used by the
static field everything works fine.

I have to use css because the content has multiple styles (different sizes,
colors, etc.), using TextFormat would be a joke.
I have the use the same font for all text because I want the site to be
cohesive.

I don't want to change all my static textfields to dynamic textfields because
even with embedded fonts & antialiasing, some monitors display dynamic text
very poorly, and for something like the logo I want to make sure its nice &
quality.

There has to be workaround of some kind. The only thing I've come up with is
going into photoshop and creating gif's for each of my static text fields -
which seems like a rediculous hack.

Oh FYI, I've tried adding a static & dynamic textfield (with embedded font)
off stage with all characters needed - didn't work.

there has to be a way to use an embedded font for dynamic fields that is also
used by static fields, i mean common.

ANY help please, thanks.




Re: Dynamic & Static TextField Embedded Font + CSS + HTML, please help pajaroplus
9/29/2007 4:15:51 PM
In general, when i need to attach a font, i don't add it to the library. What I
do is to create some text dummy text fields with the fonts embedded. This gives
me less font issues.

This also allows me to see clearly that i embedded all variations of the font
(regular, bold, italic, italic bold, etc).
AddThis Social Bookmark Button