Yes, well I am not sure why you still didn't get the solution when you have explained it properly in your question. :-)
1) Create a global variable and name it something like, playSound etc.
var playSound = true;
2) Once you have changed the picture play the sound using a condition,
if(playSound) {
playSound = false;
}
3) Now try again, it won't play sound because the function to play the sound is in a condition. The condition is controlled by the variable above. So once you change it to false, it won't play the sound again.
Another solution I am thinking about uses the
src
element of the image to determine whether to play the sound or not. But that will be a little bit complex, so use the one shown above.