I am making a sound effect button and the simulator crashes immediately after it is opened every time. Why is this? I am on Windows btw. Thanks.
display.setStatusBar(display.HiddenStatusBar)
local background = display.newImage(“Assets/John Cena Background.jpg”, 50, 475);
local button = display.newImage(“Assets/John Cena Button.png”, 50, 475);
background.x = 130;
background.y = 170;
button.width = 355;
button.height = 168.5;
button.x = button.x + 107;
button.y = button.y - 15;
local soundTable = {
johnCenaSound = audio.loadSound( “Assets/John Cena Sound Effect.mp3” )
}
function button:touch( event )
if event.phase == “began” then
audio.play(soundTable[“johnCenaSound”])
end
end
button:addEventListener( “touch”, button );