PDA

View Full Version : embedded font woes w/mx.


tg
10-21-2002, 11:27 PM
ok, heres the deal.
i have a swf called embedfonttest.swf. heres the code:

function addLabel(rgb,label,r){
var tf = new TextFormat();
tf.size = 24;
tf.color=rgb;
tf.font="testFont";
obj=this.createEmptyMovieClip("mc"+(labelNum+1000),++counter);
obj.createTextField("txt",++counter,0,0,150,35);
obj.txt.autoSize;
obj.txt.selectable=false;
obj.txt.setNewTextFormat(tf);
obj.txt.text=label;
if(r==1){
obj.txt.embedFonts=true;
obj._rotation=90;
}
labelNum++;
return obj;
}
for(var i=0;i<10;i++){
col=0x000000;
twist=null;
if(i==4 || i==9){
col=0x00ff00;
if(i==9)twist=1;
}
count=addLabel(col,i,null,75);
count._x=75;
count._y=count._height*i+20;
textbox=addLabel(col,"test",twist);
textbox._x=120; //no lined up right, but i can deal with that later.
textbox._y=count._y;
}

i have also included the font in the library and set up the linkage and everything.
this swf works fine on its own.

the problem comes when i try to load this swf into another mc, the last text box (the one thats rotated) doesn't show once the swf is embedded.
heres the code for the fla that does the embed.

this.createEmptyMovieClip("holder",5000);
holder.loadMovie("embedfonttest.swf");
holder._x=20;
holder._y=20;


can't figure out whats going on here...

tg
10-21-2002, 11:30 PM
ooops. got it sorted.
i needed to include the font in the library in the swf that is doing the loading.
cheers.

CyanBlue
10-22-2002, 04:47 AM
Ain't that a b!+(&??? :(