I used the loading external text with CSS tutorial here on Kirupa at:
http://www.kirupa.com/developer/mx2004/cssfile.htm
Now it works fine when I run the movie on its own, where it occurs inside of a movie clip called “backtset” inside a file called “current.swf”.
However, I’m loading this movie into a container called “contents” in my main movie and the text-loading code obviously doesn’t work as is:
var format = new TextField.StyleSheet();
var path = "jbcss.css";
format.load(path);
format.onLoad = function(success) {
if (success) {
output.styleSheet = format;
myLoadVar = new LoadVars ();
myLoadVar.load("news.txt")
myLoadVar.onLoad = function (success){
if (success == true) {
output.variable = "news"
output.htmlText=myLoadVar.news;
}
}
} else {
output.text = "Error loading CSS file!";
}
};
I’ve tried many different targetting approaches, but being self-taught, I’m not too keen on targetting syntax. If anyone could help it would be greatly appreciated.
Once again the path is like this:
The dynamic text box is inside a movie clip called “backtest” within the file “current.swf”. “current.swf” is then loaded into a container called “contents” in the main movie.