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.
Well, I for one couldn’t get it to work (although, I’m using Flash MX for the Mac, and not MX 2004.
I go to Publish Preview/HTML and all I get is a blank screen.
I put in a static text box below the dynamic one, but no joy. I still ended up with a blank screen except for my static text.
Anything I’m doing wrong?
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?
Great… so in other words, I’ll have to borrow a friend’s machine that has MX 2004 on it, or scrap up enough bucks to afford an upgrade.
Thanks though, I was starting to get just a little frustrated with the whole thing for a moment there.
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.)