# Sounds on rollover of mc's in loop

**URL:** <https://forum.kirupa.com/t/sounds-on-rollover-of-mcs-in-loop/199213>\
**Category:** Uncategorized\
**Created:** [August 31, 2006, 6:43pm UTC](https://forum.kirupa.com/t/sounds-on-rollover-of-mcs-in-loop/199213 "2006-08-31T18:43:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dru\_nasty](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@dru\_nasty](https://forum.kirupa.com/u/dru_nasty)\
**Post date:** [August 31, 2006, 6:43pm UTC](https://forum.kirupa.com/t/sounds-on-rollover-of-mcs-in-loop/199213/1 "2006-08-31T18:43:21Z")

</div>

I’ve got the following code:

```auto

for (var i = 1; i<=4; i++) {
    var face = this["face"+i];
    face.id = i;
	face.useHandCursor = false;
    face.onRelease = function() {
        this.gotoAndPlay("release");
        userClick = userClick+this.id;
        clickAmount();
        trace("userClick = "+userClick);
    };
	face.onRollOver = function() {
		this.gotoAndPlay("over");
	};
	face.onRollOut = function() {
		this.gotoAndPlay("up");
	};
	face.onPress = function() {
		this.gotoAndPlay("press");
	};
}

```

Basically just looping through 4 movie clips with instance names face1,face2,face3,face4.  
What i need to do now is add a different sound to each onRollOver function. I’ve already got the sounds in my library but how do i make it so the appropriate sound plays for the appropriate mc? i know i have to set the linkage id to something for all the mc’s like sound1,sound2, etc. and add something to the loop regarding that but im kinda confused.
