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

flash actionscript : createtextfield imported text formatting


drummerguy88
7/27/2004 10:09:47 PM
I have the code to the point where it creates the textfield, imports the text,
and it's scrollable. The problem is, that while the text does format to white,
it won't format the font or the size. I can't figure out what's wrong. Any
ideas?

function makeDynamicTextField() {
this.createTextField("content", 1, textfieldx, textfieldy, textfieldwidth,
textfieldheight);
content.type = "dynamic";
content.multiline = true;
content.html = true;
content.wordWrap = true;
content.selectable = false;
content.scroll = true;
scrollbar.setScrollTarget(content);
loadVarsText = new loadVars();

loadVarsText.load("http://www.geocities.com/jon_bollinger/"+wanted_section+".ht
ml");
loadVarsText.onLoad = function(success) {
if (success) {
loading._alpha = 0;
scrollbar._alpha = 100;
content.html = true;
content.htmlText = this.content;
content.font = "Eurostile";
content.size = 10;
content.textColor = "0xFFFFFF";
section = sectiontext;
}
};
}
Jack.
7/27/2004 10:35:56 PM
in - function makeDynamicTextField() {..you need .. content.embedFonts = true;
... };

make a TextFormat -
format1 = new TextFormat;
format1.size = 10;
format1.color = 0xFFFFFF;
format1.font = "Eurostile"; // Linkage Identifier

in the onLoad, set the field
content.setNewTextFormat(format1);

hth
drummerguy88
7/27/2004 10:58:49 PM
Jack.
7/28/2004 6:15:28 AM
open the Library. use the Options, select New Font.
choose and name a font, press OK.
select your named font, right-click for Linkage..
set a Linkage Identifier and Export for Actionscript.
with an ID of "Eurostile" your code will work,

hth

AddThis Social Bookmark Button