For the right click, you'll need to add three options to the default menu - Xwidget engine does not have the concept of context sensitive menus specific to the assigned object so you have to add the options to the default right click menu.

Note: Xwidget menu options cannot be built dynamically in code so you just have to create the menus statically by hand in the designer..
Then it is a matter of assigning a function to each menu option incorporating the command playsound. As the Xwidget engine cannot handle the playing of more than one sound simultaneously, playing one sound will automatically mute the other. In this case this suits your requirement. The third menu option can play a blank wav file to mute any currently running sound. When the mute option is chosen, subsequently decide either to avoid using the playsound command or simply play a null sound instead.
One method of saving your prefs is done by having a hidden layer containing hidden text or memo boxes - see my U-Boat widget
http://bbs.xwidget.com/viewtopic.php?f=11&t=6090 for how I typically do it.
Each text box is named as a preference variable according to its function.
My hidden prefs layer is called: showWidgetPreferences
My text boxes are named as such: preferencesHintPrefValue - this naming convention allows easy conversion to a yahoo widget which uses the following naming convention : preferences.hintPref.value .
The function getprefs is called when the widget starts:
//===========================================
// this function runs on startup
//===========================================
function widgetOnLoad() {
getPrefs();
}
//=========================================================================
// this function sets the preference values to saved values
//=========================================================================
function getPrefs(){
preferenceshoffsetprefvalue.text = Getinivalue(widgetpath+"prefs.ini","prefs","preferenceshoffsetprefvalue","350");
preferencesvoffsetprefvalue.text = Getinivalue(widgetpath+"prefs.ini","prefs","preferencesvoffsetprefvalue","350");
preferenceswidgetTooltipvalue.text = Getinivalue(widgetpath+"prefs.ini","prefs","preferenceswidgetTooltipvalue","Double-Click on me to set the widget command");
preferencesimageCmdPrefvalue.text = Getinivalue(widgetpath+"prefs.ini","prefs","preferencesimageCmdPrefvalue","");
print("preferencesclockSizevalue.percent "+preferencesclockSizevalue.percent);
preferencessoundprefvalue.text = Getinivalue(widgetpath+"prefs.ini","prefs","preferencessoundprefvalue","enabled");
preferencesclockSizevalue.percent = Getinivalue(widgetpath+"prefs.ini","prefs","preferencesclockSizevalue","100");
preferencesLicenceHideValue.text = Getinivalue(widgetpath+"prefs.ini","prefs","preferencesLicenceHideValue",0);
preferencesMouseWheelPrefValue.text = Getinivalue(widgetpath+"prefs.ini","prefs","preferencesMouseWheelPrefValue","up");
preferencesHintPrefValue.text = Getinivalue(widgetpath+"prefs.ini","prefs","preferencesHintPrefValue","enabled");
preferencesclockFaceSwitchPrefvalue.text = Getinivalue(widgetpath+"prefs.ini","prefs","preferencesclockFaceSwitchPrefvalue","stopwatch");
preferenceswidgetLockLandscapeModePrefvalue .text = Getinivalue(widgetpath+"prefs.ini","prefs","preferenceswidgetLockLandscapeModePrefvalue","enabled");
print("preferencesHintPrefValue.text "+preferencesHintPrefValue.text);
if (preferencessoundprefvalue.text != "disabled") {
soundbutton.src="bellpushed.png"; // this in place of a checkbutton which I could not get to work correctly
} else {
soundbutton.src="bell.png";
}
PlaySound(soundbutton);
}
//=====================
//End function
//=====================
As soon as the above function is called it plays a sound according to the value set in one of the prefs.
//=========================================================================
// this function saves the preferences to an ini file for later use
//=========================================================================
function SavePrefs()
{
print ("Saving Prefs ");
Setinivalue(widgetpath+"prefs.ini","prefs","preferenceshoffsetprefvalue",preferenceshoffsetprefvalue.text);
Setinivalue(widgetpath+"prefs.ini","prefs","preferencesvoffsetprefvalue",preferencesvoffsetprefvalue.text);
Setinivalue(widgetpath+"prefs.ini","prefs","preferenceswidgetTooltipvalue",preferenceswidgetTooltipvalue.text);
//print("preferencesimageCmdPrefvalue.text "+preferencesimageCmdPrefvalue.text);
Setinivalue(widgetpath+"prefs.ini","prefs","preferencesimageCmdPrefvalue",preferencesimageCmdPrefvalue.text);
Setinivalue(widgetpath+"prefs.ini","prefs","preferencessoundprefvalue",preferencessoundprefvalue.text);
Setinivalue(widgetpath+"prefs.ini","prefs","preferencesclockSizevalue",preferencesclockSizevalue.percent);
Setinivalue(widgetpath+"prefs.ini","prefs","preferencesLicenceHideValue",preferencesLicenceHideValue.text);
Setinivalue(widgetpath+"prefs.ini","prefs","preferencesMouseWheelPrefValue",preferencesMouseWheelPrefValue.text);
Setinivalue(widgetpath+"prefs.ini","prefs","preferencesHintPrefValue",preferencesHintPrefValue.text);
Setinivalue(widgetpath+"prefs.ini","prefs","preferencesclockFaceSwitchPrefvalue",preferencesclockFaceSwitchPrefvalue.text);
Setinivalue(widgetpath+"prefs.ini","prefs","preferenceswidgetLockLandscapeModePrefvalue",preferenceswidgetLockLandscapeModePrefvalue.text);
print("preferencesHintPrefValue.text "+preferencesHintPrefValue.text);
}
//=====================
//End function
//=====================
This shows how I get settings from an ini file and how I save them too. Sometimes I have to create the ini file manually the first time they are used. My hidden prefs layer can be made visible on request so I have a nice and pretty underlying image that holds the text boxes and descriptions. This allows you to view all the fields and change the preferences they hold manually. I make the preferences layer visible from the right click menu using a menu option named "Show Preferences" that runs this command showWidgetPreferences.visible = true; to make the layer and all the contained objects visible.

This is taken directly from the style of the konfabulator/Yahoo widget engine that has built-in functionality to provide a GUI for the storage and handling of preferences. I have my own radio boxes showing here as I had problems making the Xwidget engine's radio buttons work the way I wanted them to.