PDA

View Full Version : shared fonts via aseets.swf


amigo_largo
09-15-2005, 11:06 AM
I have 3 swf's in total, "font-library.swf" , "assets.swf" and "templates.swf".

font-library.swf contains 3 fonts, defined as shared library items.

assets.swf contains the assets, including linkage to the font-library items (I dragged these into the library window, and set the url)

templates.swf loads assets.swf into a targetMC, where it deploys the assets on the stage, as below:

buildLandingPage = function() {
this = page.landingPage;
with(this) {
this.attachMovie("bg", "bg", 0);
this.attachMovie("anim", "anim", 1);
this.attachMovie("txtDecor", "txtDecor",2);
this.txtDecor._x=171;
this.txtDecor._y=199;
this.createTextField("fieldHdLogical",3,0,137,352,27);
with(this.fieldHdLogical) {
selectable = true;
embedFonts = false;
html = false;
autoSize = true;
multiline = false;
wordWrap = true;
border = false;
text="logical header text";
}
var t = new TextFormat();
t.color= 0xFFFFFF;
t.align= "center";
t.font = "Snell";
t.size = 11;
this.fieldHdLogical.setTextFormat(t);
}

My problem is I cannot display the text using my shared fonts. I have tried putting a textfield on the stage in the assets movie, as well as in the templates movie, then selecting the linked font from the fontlist (with the asterisk*), but nothing seems to work.

If anyone is up on the black art of shared fonts, please help!

thanks

Tom