hi I have a preloader that loads external source into _level1 but when my source loads non of the external data gets loaded like xml data, css, or text files here is an example of my preloader:
if (_level1.getBytesTotal() > 0) {
loaded = _level1.getBytesLoaded();
total = _level1.getBytesTotal();
percent = Math.round((loaded / total) * 100);
percentBar.gotoAndStop(percent);
if (loaded == total) {
_level1.play();
gotoAndStop(4);
}
}
and here is an example of my external css and text that should load but it doesn’t:
var format = new TextField.StyleSheet();
var path = "css.css";
about.html = true;
about.htmlText = quick;
myLoadVar = new LoadVars ();
myLoadVar.onLoad = function (success){
if (success == true) {
about.htmlText=this.content;
trace(this.content);
} else {
}
}
format.onLoad = function(success) {
if (success) {
myLoadVar.load("about.txt");
about.styleSheet = format;
about.htmlText = quick;
} else {
about.htmlText = "Error loading CSS file!";
}
};
format.load(path);
Same applies to external xml data. can anyone please see what I am doing wrong.