Hi,
Here is some actionscript:
var myStyle:TextField.StyleSheet = new TextField.StyleSheet();
myStyle.load("text.css");
content_txtnews.styleSheet = myStyle;
content_txtnews.multiline= true;
content_txtnews.wordWrap = true;
content_txtnews.html = true;
var story:XML = new XML();
story.ignoreWhite = true;
story.load("news.html");
story.onLoad = function () {
content_txtnews.htmlText = story;
}
If I But this code in one scen, it works fine,
If I But two of this In one scene one of them takes over the other
var myStyle:TextField.StyleSheet = new TextField.StyleSheet();
myStyle.load("text.css");
content_txtnews.styleSheet = myStyle;
content_txtnews.multiline= true;
content_txtnews.wordWrap = true;
content_txtnews.html = true;
var story:XML = new XML();
story.ignoreWhite = true;
story.load("news.html");
story.onLoad = function () {
content_txtnews.htmlText = story;
}
var myStyle:TextField.StyleSheet = new TextField.StyleSheet();
myStyle.load("text.css");
content_txtpress.styleSheet = myStyle;
content_txtpress.multiline= true;
content_txtpress.wordWrap = true;
content_txtpress.html = true;
var story:XML = new XML();
story.ignoreWhite = true;
story.load("press.html");
story.onLoad = function () {
content_txtpress.htmlText = story;
}
How do I solve this?
Thanks in advance
Henric