I’ve got the following code:
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.