CSS not loading

I have two MC’s news1 & news2.

Each of them has an identical xml constructor and css constructor. The first one loads ok, but the second one does not.

Here is my code for news1


//load css
var myCSS = new TextField.StyleSheet();
var cssURL = "stylesheet.css";
myCSS.load(cssURL);
myCSS.onLoad = function(success) {
	if (success) {
		myTitle.styleSheet = myCSS;
		myContent.styleSheet = myCSS;
	}
};
//add xml content
newsContent = new XML();
newsContent.ignoreWhite = true;
newsContent.load("news.xml");
newsContent.onLoad = function(success)
{
	if(success)
	{
		myTitle.text = newsContent.firstChild.firstChild.firstChild;
		myContent.text = newsContent.firstChild.firstChild.firstChild.nextSibling;
	}
}

news2


//load css
var myCSS = new TextField.StyleSheet();
var cssURL = "stylesheet.css";
myCSS.load(cssURL);
myCSS.onLoad = function(success) {
	if (success) {
		myTitle.styleSheet = myCSS;
		myContent.styleSheet = myCSS;
	}
};
//add xml content
newsContent = new XML();
newsContent.ignoreWhite = true;
newsContent.load("news.xml");
newsContent.onLoad = function(success)
{
	if(success)
	{
		myTitle.text = newsContent.firstChild.firstChild.nextSibling.firstChild.firstChild;
		myContent.text = newsContent.firstChild.firstChild.nextSibling.firstChild.nextSibling.firstChild;
	}
}


My XML file



<newsContent>
	<newsA>
		<newsAtitle>New Web Site Launched</newsAtitle>
		<newsAstory>A new website has been launched to showcase Nick Toye's work.  It is modelled on various influences from the New Beetle, to Royksopp music.  A smooth transition was one of the main aims, along with an ease of use.
I wanted to provide information without it getting lost in the navigation, I feel that I have achieved this simplicity.
I have found that in many of my designs, white space generates a calming atmosphere and allows the content to flow with more impact.</newsAstory>
	</newsA>
	<newsB>
		<newsBtitle>Some more news</newsBtitle>
		<newsBstory>Some more news will go here</newsBstory>
	</newsB>
</newsContent>


and my CSS stylesheet


newsAtitle {
color: #990000;
font-size:10px;
}
newsAstory {
color:#006699;
font-size:10px;
}
newsBtitle {
color: #990000;
font-size:10px;
}
newsBstory {
color:#006699;
font-size:10px;
}

If anyone can see why the stylesheet isn’t loading for the second MC I will be most grateful.

Many thanks in advance

I am having this same problem. However, I may be wrong about this but I don’t think
you need to load the same css and xml object twice. You should be able to pull the info needed from a single loaded xml and css object. once again im very new to this so I may be misunderstanding what your doing.

I have one xml and one css file and am trying to load it into two different dynamic text fields. I can get the xml to load to each text field fine, but the css is only working on one of my text fields. My code is very similar to Nick Toye’s above.

Anyone have any ideas?

Any ideas on this, I have just returned from a three week holiday, so I am looking for a quick solution on this.