# Flash8 Applying CSS Styles

**URL:** <https://forum.kirupa.com/t/flash8-applying-css-styles/191717>\
**Category:** flash\
**Created:** [June 22, 2006, 2:19pm UTC](https://forum.kirupa.com/t/flash8-applying-css-styles/191717 "2006-06-22T14:19:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iftecan2000](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/iftecan2000/32/2515_2.png) [@iftecan2000](https://forum.kirupa.com/u/iftecan2000)\
**Post date:** [June 22, 2006, 2:19pm UTC](https://forum.kirupa.com/t/flash8-applying-css-styles/191717/1 "2006-06-22T14:19:18Z")

</div>

Hi;

Currently I am restructuring a flash site. The reason to this restructure is that the frequently edited contents should be handled by a club’s staff member. In one part of the site the contents are read from a text file and displayed , which works alright. However when I try to load a CSS file and try to apply the styles the display seems to be empty. When I include **trace** it shows me that the CSS and the text file are loaded but returns an empty display.

Also the other problem is that even if I load and display the contents of the text file alone, it will not display until I embed some characters such as Uppercase, Lowercase, Numerals and Punctuations (around 114 glyphs).

**film** : is the movie clip in which the **trip\_txt** dynamic text resides.  
Since I am using a custom coded scroll bar the **maskTrip\_mc** movie clip acts as mask.

film.setMask(maskTrip\_mc);

function getContent(){  
var textData = new LoadVars();  
textData.load(“trips.txt”);  
textData.onLoad = function(success){  
if(success){  
trace(“Loading complete…”);  
film.trip\_txt.html = true;  
film.trip\_txt.variable = “content”;  
film.trip\_txt.htmlText = this.content;  
film.trip\_txt.autoSize = true;  
film.autoSize = true;  
}  
else{  
trace(“error Loading”);  
}  
};  
}

var format = new TextField.StyleSheet();  
var path = “news\_styles.css”;  
format.load(path);  
format.onLoad = function(success) {  
if (success) {  
trace(success);  
film.trip\_txt.styleSheet = format;  
getContent();  
} else {  
trace(success);  
film.trip\_txt.text = “Error loading CSS file!”;  
}  
};

P.S Guys I am a newbie therefore keep this in mind during your reply…
