Reputation: 39
I have been trying to test out some stuff in Corona sdk because I want to make a math game that will have levels of math for children up to adults. Here is the code I have (It is just a test)
Main.lua:
display.setStatusBar(display.HiddenStatusBar)
local ButtonClickedSound = audio.loadSound( "Button Clicked Sound.wav")
local FailSound = audio.loadSound( "Fail Sound.wav" )
local SucessSound = audio.loadSound( "Sucess Sound.mp3" )
-- Physics
local physics = require('physics')
physics.start()
local FailSoundChannel = audio.play(FailSound)
-- local gameBg = display.newImage('\Images\Background')
Config.lua:
application =
{
content =
{
width = 320,
height = 480,
scale = "letterbox"
},
}
I have a sound in my file and everything is correctly named. Do you know what the problem is?
Upvotes: 0
Views: 547
Reputation: 521
display.setStatusBar(display.HiddenStatusBar)
local ButtonClickedSound = audio.loadSound( "Button Clicked Sound.wav")
local FailSound = audio.loadSound( "Fail Sound.wav" )
local SucessSound = audio.loadSound( "Sucess Sound.mp3" )
-- Physics
physics = require('physics')
physics.start()
local function delay()
local FailSoundChannel = audio.play(FailSound)
end
timer.performWithDelay(100, delay, 1)
try this and see. And more over check whether the file names and path are correct.
Upvotes: 0