# Loading externall CSS and text

**URL:** <https://forum.kirupa.com/t/loading-externall-css-and-text/129681>\
**Category:** Uncategorized\
**Created:** [November 26, 2004, 7:39pm UTC](https://forum.kirupa.com/t/loading-externall-css-and-text/129681 "2004-11-26T19:39:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![index](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@index](https://forum.kirupa.com/u/index)\
**Post date:** [November 26, 2004, 7:39pm UTC](https://forum.kirupa.com/t/loading-externall-css-and-text/129681/1 "2004-11-26T19:39:48Z")

</div>

I have modified the following code found [http://www.kirupa.com/developer/mx2004/cssfile.htm](http://www.kirupa.com/developer/mx2004/cssfile.htm)

However, it seems like the portions of the text that i apply a style to don’t show at all. All other text (which i didn’t apply style-def to) appears fine.  
I’ve gone over this code at least 40-50 times, but i just can’t figure out what i’m missing.

[AS] var format = new TextField.StyleSheet();  
var path = “[http://www.kirupa.com/developer/mx2004/code/flash.css](http://www.kirupa.com/developer/mx2004/code/flash.css)”;  
format.load(path);  
format.onLoad = function(success) {  
if (success) {  
\_root.scroller\_right.main2.myTextField2.styleSheet = format;  
loadText2 = new LoadVars();  
loadText2.load(“display\_home\_2.txt”);  
loadText2.onLoad = function(success) {  
if (success == true) {  
// trace(success);  
\_root.scroller\_right.main2.myTextField2.variable = “displayText”;  
\_root.scroller\_right.main2.myTextField2.html = true;  
\_root.scroller\_right.main2.myTextField2.htmlText = loadText2.displayText;  
bottom2 = main2.\_y+mask\_mc2.\_height-main2.\_height-space2;  
}else{  
\_root.scroller\_right.main2.myTextField2.htmlText = “\<p class=‘two’\>Error loading content!\</p\>”;

}  
}  
}  
else {  
\_root.scroller\_right.main2.myTextField2.htmlText = “Error loading CSS file!”;  
}  
}; [/AS]
