This is weird… I red the stylesheet tutorial in kirupa and in macromedia site but it doesnt work for me. I dont undestand why…
This code should work fine but it doesnt!!!
var css_styles = new TextField.StyleSheet();
css_styles.load("styles.css");
css_styles.onLoad = function(ok) {
if(ok) {
// display style names
trace(this.getStyleNames());
} else {
trace("Error loading CSS file.");
}
}
I have the .css file in same directory and its rights are all allowed. I dont get why its not working… I tried some trace inside the function but it doesnt even do that. whats wrong with this? Does anyone have any idea?
Cheers
MZA