Using varaible values in actions

I have a site that has several different loops playing in the background. I want to control them with a single sound icon.

What I was thinking of doing was setting a variable value when the sound was played - something like soundplaying=loop1.

Then, when the speaker icon is clicked to mute the sound, it would be something like this:


onRelease {
var (soundplaying value):Sound = new Sound();
    (soundplaying value).onLoad = function(success:Boolean):Void {
    if (success) {
        stopAllSounds();
        trace("Sound Loaded");
        (soundplaying value).start(0, 99);
    }
};
(soundplaying value).loadSound("loop2.mp3", false);

all the (soundplaying value) would be replaced with the value of the soundplaying variable.

How would I call that variable value so that it plugs into the code like this, or is it even possible?