# onRollOver, onRollOut not working on all attached clips

**URL:** https://forum.kirupa.com/t/onrollover-onrollout-not-working-on-all-attached-clips/226522
**Category:** Uncategorized
**Created:** [May 22, 2007, 2:53am UTC](https://forum.kirupa.com/t/onrollover-onrollout-not-working-on-all-attached-clips/226522 "2007-05-22T02:53:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jensou](https://avatars.discourse-cdn.com/v4/letter/j/c37758/32.png) [@jensou](https://forum.kirupa.com/u/jensou)
#### Post date: [May 22, 2007, 2:53am UTC](https://forum.kirupa.com/t/onrollover-onrollout-not-working-on-all-attached-clips/226522/1 "2007-05-22T02:53:57Z")

</div>

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](http://www.jsouza.com/newsTest.swf) 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. 🙂

```auto

//-----------------------------------------------------------
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");

```
