At moment for sound playing button I am using code outlined below;
could anyone help me with making the button that works exactly the same but is based on audio.* instead of outdated media.*? Tried to do this, but my coding skills are somewhat still weak
Thanks
[lua]local widget = require(“widget”)
local BEEP = media.newEventSound(“BEEP.mp3”)
local button_BEEP_Press = function(event)
media.playEventSound(BEEP,button_BEEP_Press)
end
local button_BEEP = widget.newButton
{
defaultFile = “buttondefault.png”,
overFile = “buttonpressed.png”,
onPress = button_BEEP_Press,
}
button_BEEP.x = display.contentCenterX; button_BEEP.y = display.contentCenterY[/lua]