function mySound() { snd = new Sound(); snd.attachSound('linkageId') snd.play(); } // myButton.onPress = function(){ mySound(); }