The tutorial from http://www.kirupa.com/developer/mx2004/cssfile.htm worked out great! Did some modifications so that it loads up specific files at the click of a button. The following worked great for me.
on (release) {
var format = new .TextField.StyleSheet();
var path = "flash.css";
format.load(path);
format.onLoad = function(success) {
if (success) {
output.styleSheet = format;
myLoadVar = new LoadVars ();
myLoadVar.load("content.txt")
myLoadVar.onLoad = function (success){
if (success == true) {
output.variable = "kirupa"
output.htmlText=myLoadVar.kirupa;
}
}
} else {
output.text = "Error loading CSS file!";
}
}
}
But I then placed these buttons inside a movie clip so now… when i press the buttons the text no longer loads up.
I’ve tried applying _root to “output” … which works if i view it within its own movie file. However, it’s 2 levels deep.
correct me if i’m wrong, but i think the CSS tag feature is only supported with flash player 7. and if i remember correctly mx only supports up to player 6?
Well, I just attempted the CSS tutorial again on a PC with MX 2004. Still got no success. I was able to get partial success yesterday after upgrading on my Mac, but for some reason, the one located at http://www.kirupa.com/developer/mx2004/css.htm just gives me a blank screen.
I can also see now that I’ll have to embedd characters instead of using the embedded characters of the style sheet (at least my attempts yesterday tell me this.)
Creating engaging and entertaining content for designers and developers since 1998.