Answered
not sure why my external CSS file will not load
using this for the AS
var styles:TextField.StyleSheet = new TextField.StyleSheet();
styles.onLoad = function(success:Boolean):Void {
if (success) {
//display style names
trace(this.getStyleNames());
} else {
trace("Error loading CSS file.");
}
};
styles.load("styles.css");
I have a CSS file in the same folder called styles.css
for some reason though I only get the message
"Error loading CSS file"
I don't believe there are any errors in my script, but I could be wrong. A second pair of eyes will help!
var styles:TextField.StyleSheet = new TextField.StyleSheet();
styles.onLoad = function(success:Boolean):Void {
if (success) {
//display style names
trace(this.getStyleNames());
} else {
trace("Error loading CSS file.");
}
};
styles.load("styles.css");
I have a CSS file in the same folder called styles.css
for some reason though I only get the message
"Error loading CSS file"
I don't believe there are any errors in my script, but I could be wrong. A second pair of eyes will help!