iām trying to make this little news section and for some reason the rollover and rollout works only on the last news itemClip to be attached. you can take a look at it HERE and see that the bottom one is the only one working.
can anyone tell me why and what i might have done wrong in the actionscript?
thanks for the help.
//-----------------------------------------------------------
Stage.scaleMode = "noScale";
newsXML = new XML();
newsXML.ignoreWhite = true;
//-----------------------------------------------------------
newsXML.onLoad = function(success){
if(success){
trace("success!!!");
var root = this;
var cNodes = root.firstChild.childNodes;
trace(cNodes);
_global.firstNewsItem = cNodes[0];
for (var i = 0; i < cNodes.length; i++){
item = itemHolder.attachMovie("itemClip", "itemClip" + i, i);
trace(item);
itemHolder.setMask(itemMask);
item._x = 0;
item._y = 23 * i;
item.myT.text = cNodes*.attributes.name.toString();
item.itemDate.text = cNodes*.attributes.date.toString();
item.myTitle = cNodes*.attributes.name.toString();
item.myDetails = cNodes*.attributes.details.toString();
item.myImg = cNodes*.attributes.img;
}
item.onRollOver = function(){
this.itemM.gotoAndPlay("over");
}
item.onRollOut = function(){
this.itemM.gotoAndPlay("out");
}
item.onRelease = function(){
var aItem = this;
imgHolder.loadMovie(aItem.myImg);
myTitle = aItem.myTitle;
myDetails = aItem.myDetails;
}
}
}
newsXML.load("news_xml/newsList.xml");