Hi,
How could I make a mute button which let’s me turn the sound back on by clicking it again (it would also be nice if the image would switch when the button is pressed).
Here is my code at current:
-- Load Background Music 1
media.playSound( 'music1.mp3', true )
-- Music Pause Button
local musicbutton = display.newImage( "musicnote1.png" )
musicbutton.x = 965
musicbutton.y = 705
function musicbutton:tap( event )
media.pauseSound( 'music1.mp3' )
end
musicbutton:addEventListener( 'tap', musicbutton )
Best Regards,
Adam. [import]uid: 83162 topic_id: 13786 reply_id: 313786[/import]