all groups > macromedia flash sitedesign > january 2007 >
You're in the

macromedia flash sitedesign

group:

Text shows without CSS


Text shows without CSS jlucchesi
1/30/2007 8:41:48 AM
macromedia flash sitedesign:
Hi -
In the 2nd panel (Cuisines and Menus) of a site I'm trying to build at:
http://www.thymetoeatpcs.com/index2.html
there's a dynamic TextField that brings in Text and CSS.

It works fine locally but when I upload it and view it, the CSS doesn't get
loaded.

To make this more confusing...sometimes it does and sometimes it doesnt.

I've attached the code but I really have no idea what's wrong.

How can I make sure the text and CSS load in time to appear correctly when the
user gets to that page?

TIA your expertise.
JL

this.createTextField("news_txt", 99, 130, 230, 260, 160);
news_txt.html = true;
news_txt.multiline = true;
news_txt.wordWrap = true;
news_txt.border = true;
news_txt.borderColor = 0x524D16;

// Location of CSS and text files to load.

var txt_url:String = "CuisineList.html";
var css_url:String = "thyme.css";

// Define onLoad handler and Load CSS file.
styles.onLoad = function(success:Boolean):Void {
if (success) {
/* If the style sheet loaded without error,
then assign it to the text object,
and assign the HTML text to the text field. */
news_txt.styleSheet = styles;
//news_txt.text = storyText;
} else {
trace("Unable to load CSS file.");
}
};
styles.load(css_url);

// Define onData handler and load text to display.
myVars_lv.onData = function(src:String):Void {
if (src != undefined) {
news_txt.htmlText = src;
} else {
trace("Unable to load HTML file");
}
};
myVars_lv.load(txt_url);
Re: Text shows without CSS aniebel
1/30/2007 11:41:28 AM
Re: Text shows without CSS jlucchesi
1/30/2007 2:14:49 PM
Amy - Thanks for the suggestion but
I have not embedded a font because the CSS lists a few as in:
font-family: Verdana,Arial,Helvetica,sans-serif;
Re: Text shows without CSS jlucchesi
1/31/2007 2:21:25 PM
Do I need to embed fonts to use CSS and HTML? The CSS is calling for common fonts.
AddThis Social Bookmark Button