I am trying to fade text that is loaded via XML and then formatted by using CSS, the thing is when I try and apply the CSS it stops fading, I have attached a sample fla, I am quite desperate to find a solution to this.
Many thanks in advance.
I am trying to fade text that is loaded via XML and then formatted by using CSS, the thing is when I try and apply the CSS it stops fading, I have attached a sample fla, I am quite desperate to find a solution to this.
Many thanks in advance.
You need to add “_parent.” to reference your dynamic txt box as it is not on the _root level.
var myCSS = new TextField.StyleSheet();
var cssURL = “stylesheet.css”;
myCSS.load(cssURL);
myCSS.onLoad = function(success) {
if (success) {
_parent.myText.styleSheet = myCSS;
}
};
newsContent = new XML();
newsContent.ignoreWhite = true;
newsContent.load(“news1.xml”);
newsContent.onLoad = function(success) {
if (success) {
myText.text = newsContent;
}
};
Thanks, but I don’t think that is the problem.
In the end I got a tip from a pal, if the CSS provides a font family it wont work, so I took out the font-family tag and it works fine
the .fla you sent didn’t work at all, regardless of the fade up/out. Thus the _parent. I added. Glad you figured it out.
:: Copyright KIRUPA 2024 //--