All sounds off on pop-up

I found this on an old post and it perfectly sums up what I am trying to do.

“You have a flash file with some background music looping, and a button which activates a HTML pop-up window. Is there any possibillity by actionscript, java, anything; to mute the sound when you leave SWF file and then un-mute the sound when you later return?”

Would love to get an idea on this.

A.