What is wrong with my code

local widget = require( “widget” )

local background = display.newImage(“carbonfiber.jpg”, true) – flag overrides large image downscaling

background.x = display.contentWidth / 2

background.y = display.contentHeight / 2

local GodzillaMarc785758480mp3 = audio.loadSound(“GODZILLA”)

local GroanSoundBiblecom1306380507mp3 = audio.loadSound(“groan”)

local PieceOfCrapKevanGC288403955mp3 = audio.loadSound(“FART1”)

local roundedRect = display.newRoundedRect( 10, 50, 300, 40, 8 )

roundedRect.anchorX, roundedRect.anchorY = 0.0, 0.0 – simulate TopLeft alignment

roundedRect:setFillColor( 0/255, 0/255, 0/255, 170/255 )

local t = display.newText( “Waiting for button event…”, 0, 0, native.systemFont, 18 )

t.x, t.y = display.contentCenterX, 70


– Create 5 buttons, using different optional attributes


local button1Press = function( event )

                t.text = “O MY GOD!!!”

end

local button1Release = function( event )

                t.text = “GODZILLA”

end

local buttonHandler = function( event )

                t.text = "id = " … event.target.id … ", phase = " … event.phase

end

function myButton1 = function( event )

audio.play(Godzilla-Marc)

end

local button1 = widget.newButton

{

                defaultFile = “buttonRed.png”,

                overFile = “buttonRedOver.png”,

                label = “Godzilla”,

                emboss = true,

                onPress = button1Press,

                onRelease = button1Release,

}

local button2Press = function( event )

                t.text = “Um…”

end

local button2Release = function( event )

                t.text = “…”

end

local buttonHandler = function( event )

                t.text = "id = " … event.target.id … ", phase = " … event.phase

end

function myButton2:tap( event )

audio.play(Groan-SoundBible.com)

end

local button2 = widget.newButton

{

                id = “button2”,

                defaultFile = “buttonYellow.png”,

                overFile = “buttonYellowOver.png”,

                label = “groan”,

                labelColor =

                {

                                default = { 51, 51, 51, 255 },

                },

                font = native.systemFont,

                fontSize = 22,

                emboss = true,

                onPress = button2Press,

                onRelease = button2Release,

}

local button3Press = function( event )

                t.text = “O MY GOD!!!”

end

local button3Release = function( event )

                t.text = “”

end

local buttonHandler = function( event )

                t.text = "id = " … event.target.id … ", phase = " … event.phase

end

function myButton3:tap( event )

audio.play(Piece_Of_Crap-KevanGC)

end

local button3 = widget.newButton

{

                id = “button3”,

                defaultFile = “buttonGray.png”,

                overFile = “buttonBlue.png”,

                label = “FART 1”,

                font = native.systemFont,

                fontSize = 28,

                emboss = true,

                onPress = button3Press

}

button1.x = 160; button1.y = 160

button2.x = 160; button2.y = 240

button3.x = 160; button3.y = 320

Thanks for your post.  Since this is your first post, there are a few things you can do to assure your success in getting your answers.  First, the title of your post is too generic.  It should tell us something about the problem you are having.  People search for solutions in the forums and a good title will help them find answers.

Secondly, you need to post your code using our formatting tools.  You can use the <> button in the editing menu above and copy/paste your code into the window that pops up or type into the typing area, paste your code in then close it with .  You will need to leave the space after the [ out since I can’t actually type the codes in for you to see.

Next, you really need to post a description of your problem. We can’t guess as to what your issue is.  What have you tried?  What error are you getting?  What behavior are you expecting.   Also sometimes, its good to know what version of Corona SDK you are building with and what operating system you’re using (Windows, Mac OS-X) and what devices you are planning on building too.

You can go back and edit your post, provide the helpful information, put the code tags around your code and the community will respond with answers for you.

But that said, there are obvious problems in your audio handling.  Look at this line of code:

local GodzillaMarc785758480mp3 = audio.loadSound(“GODZILLA”)

and this one:

audio.play(Godzilla-Marc)

The first line you are creating a variable named:  GodzillaMarc785758480mp3   that will hold the handle to a loaded sounds.   The sound you are trying to load has a filename of “GODZILLA”.   I’m willing to bet that there is no file named “GODZILLA” in your project.  I would be willing to guess there is one named:  GodzillaMarc785758480.mp3.   The audio.load() API call is this:

local soundhandle = audio.load( filename )

So if I’m speculating correctly, you probably should be doing:

local GODZILLA = audio.load( “GodzillaMarc785758480.mp3” )

Then with your loaded sounds in the handle named GODZILLA, you would then do:

audio.play( GODZILLA )

All of your audio have these issues and will need to be fixed.  But we still don’t know what other problems you are having.

Rob

Thank you for the information. 

When i run the code it says I have a problem with local this line it says i have ‘(’ expected near ‘=’ as i am new to all of this i have no idea what this means. 

 It occurs on this line and probably even more of them.

 

button2Press = function( event ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.text = "Um...." end

There is nothing wrong with that block of code.  However, it could be caused by other code around it.  Please copy and paste the entire error message including the stack trace .

Rob

Thank you that helped I am now having trouble with this code.

local&nbsp;GODZILLA= audio.load(GodzillaMarc785758480mp3) local groan = audio.load(GroanSoundBiblecom1306380507mp3) local FART1 = audio.load(PieceOfCrapKevanGC288403955mp3)

 

This is what it is saying is the error.

main.lau:6: attempt to call field ‘load’ (a nil value) stack traceback main.lau:6: in main chunck

There is no function audio.load()

http://docs.coronalabs.com/daily/api/library/audio/index.html

Use either audio.loadSound() or audio.loadStream()

Also, you need quotes around file names and they need proper extensions:

local GODZILLA= audio.loadSound("GodzillaMarc785758480.mp3") local groan = audio.loadSound("GroanSoundBiblecom1306380507.mp3") local FART1 = audio.loadSound("PieceOfCrapKevanGC288403955.mp3")

I strongly suggest adopting a better naming style. i.e. Follow a consistent style in your code and when naming assets:

local godzilla = audio.loadSound("godzillaMarc.mp3") local groan = audio.loadSound("groanSound.mp3") local fart1 = audio.loadSound("kevinSound.mp3")

Thank you for the help it is working but we can’t get the sound to actually play. Do we need to change or add anything else to our code?

local widget = require( "widget" ) local background = display.newImage("carbonfiber.jpg", true) -- flag overrides large image downscaling background.x = display.contentWidth / 2 background.y = display.contentHeight / 2 local soundhandle = audio.loadSound("GodzillaMarc785758480.mp3" ) local soundhandle = audio.loadSound ("GroanSoundBiblecom1306380507.mp3" ) local soundhandle = audio.loadSound ("PieceOfCrapKevanGC288403955.mp3" ) local GODZILLA = audio.loadSound ( "GodzillaMarc785758480.mp3" ) local groan = audio.loadSound ("GroanSoundBiblecom1306380507.mp3" ) local FART1 = audio.loadSound ("PieceOfCrapKevanGC288403955.mp3" ) &nbsp; local roundedRect = display.newRoundedRect( 10, 50, 300, 40, 8 ) roundedRect.anchorX, roundedRect.anchorY = 0.0, 0.0 -- simulate TopLeft alignment roundedRect:setFillColor( 0/255, 0/255, 0/255, 170/255 ) &nbsp; local t = display.newText( "Waiting for button event...", 0, 0, native.systemFont, 18 ) t.x, t.y = display.contentCenterX, 70 &nbsp; local button1Press = function( event ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.text = "O MY GOD!!!" audio.play("GodzillaMarc785758480.mp3") end &nbsp; local button1Release = function( event ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.text = "GODZILLA" end &nbsp; &nbsp; local buttonHandler = function( event ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.text = "id = " .. event.target.id .. ", phase = " .. event.phase end local button1 = widget.newButton { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; defaultFile = "buttonRed.png", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; overFile = "buttonRedOver.png", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; label = "Godzilla", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; emboss = true, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; onPress = button1Press, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; onRelease = button1Release, } local button2Press = function( event ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.text = "Um...." audio.play ( GroanSoundBiblecom ) end &nbsp; local button2Release = function( event ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.text = "...." end &nbsp; &nbsp; local buttonHandler = function( event ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.text = "id = " .. event.target.id .. ", phase = " .. event.phase end &nbsp; &nbsp; local button2 = widget.newButton { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id = "button2", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; defaultFile = "buttonYellow.png", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; overFile = "buttonYellowOver.png", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; label = "groan", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; labelColor = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default = { 51, 51, 51, 255 }, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; font = native.systemFont, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fontSize = 22, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; emboss = true, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; onPress = button2Press, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; onRelease = button2Release, &nbsp; } local button3Press = function( event ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.text = "O MY GOD!!!" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; audio.play (PieceOfCrapKevanGC) end &nbsp; local button3Release = function( event ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.text = "" end &nbsp; &nbsp; local buttonHandler = function( event ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.text = "id = " .. event.target.id .. ", phase = " .. event.phase end &nbsp; local button3 = widget.newButton { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id = "button3", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; defaultFile = "buttonGray.png", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; overFile = "buttonBlue.png", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; label = "FART 1", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; font = native.systemFont, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fontSize = 28, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; emboss = true, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; onPress = button3Press } &nbsp; &nbsp; button1.x = 160; button1.y = 160 button2.x = 160; button2.y = 240 button3.x = 160; button3.y = 320

You dont need these three lines:

local soundhandle = audio.loadSound(“GodzillaMarc785758480.mp3” )
local soundhandle = audio.loadSound (“GroanSoundBiblecom1306380507.mp3” )
local soundhandle = audio.loadSound (“PieceOfCrapKevanGC288403955.mp3” )

GODZILLA and groan are the sound  handles.  When we give you example code, we don’t know what variable names you need, so we use descriptive variable names that we assume you’re going to replace with something that makes sense for your code.  If you only had one sound, then soundhandle would be a perfectly fine variable name.  When you have multiple sounds you have to give each variable a unique name.

The reason it’s not playing is this line:

audio.play(“GodzillaMarc785758480.mp3”)

needs to be:

audio.play( GODZILLA )

Rob

Ok all of that works but it is saying that my data is NULL in reference to the sound now, but we have all the audio bites in the same folder, made sure the names are the same, and downloaded properly.

Please give us the exact error message and mention if that is a dialog pop-up or a console message.  You may get both and they may vary slightly.

That is the exact error that’s what it is saying on the command prompt and the simulator.

You guys at Corona are useless. You make me not want to use Corona.

Hi monaghan_logan, may I inquire as to what leads you to your opinion? How have we wronged you?  If it’s not related to this thread and it’s about something else, lets not hiijack this thread and take the conversation else where.

Rob

Thanks for your post.  Since this is your first post, there are a few things you can do to assure your success in getting your answers.  First, the title of your post is too generic.  It should tell us something about the problem you are having.  People search for solutions in the forums and a good title will help them find answers.

Secondly, you need to post your code using our formatting tools.  You can use the <> button in the editing menu above and copy/paste your code into the window that pops up or type into the typing area, paste your code in then close it with .  You will need to leave the space after the [ out since I can’t actually type the codes in for you to see.

Next, you really need to post a description of your problem. We can’t guess as to what your issue is.  What have you tried?  What error are you getting?  What behavior are you expecting.   Also sometimes, its good to know what version of Corona SDK you are building with and what operating system you’re using (Windows, Mac OS-X) and what devices you are planning on building too.

You can go back and edit your post, provide the helpful information, put the code tags around your code and the community will respond with answers for you.

But that said, there are obvious problems in your audio handling.  Look at this line of code:

local GodzillaMarc785758480mp3 = audio.loadSound(“GODZILLA”)

and this one:

audio.play(Godzilla-Marc)

The first line you are creating a variable named:  GodzillaMarc785758480mp3   that will hold the handle to a loaded sounds.   The sound you are trying to load has a filename of “GODZILLA”.   I’m willing to bet that there is no file named “GODZILLA” in your project.  I would be willing to guess there is one named:  GodzillaMarc785758480.mp3.   The audio.load() API call is this:

local soundhandle = audio.load( filename )

So if I’m speculating correctly, you probably should be doing:

local GODZILLA = audio.load( “GodzillaMarc785758480.mp3” )

Then with your loaded sounds in the handle named GODZILLA, you would then do:

audio.play( GODZILLA )

All of your audio have these issues and will need to be fixed.  But we still don’t know what other problems you are having.

Rob

Thank you for the information. 

When i run the code it says I have a problem with local this line it says i have ‘(’ expected near ‘=’ as i am new to all of this i have no idea what this means. 

 It occurs on this line and probably even more of them.

 

button2Press = function( event ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.text = "Um...." end

There is nothing wrong with that block of code.  However, it could be caused by other code around it.  Please copy and paste the entire error message including the stack trace .

Rob

Thank you that helped I am now having trouble with this code.

local&nbsp;GODZILLA= audio.load(GodzillaMarc785758480mp3) local groan = audio.load(GroanSoundBiblecom1306380507mp3) local FART1 = audio.load(PieceOfCrapKevanGC288403955mp3)

 

This is what it is saying is the error.

main.lau:6: attempt to call field ‘load’ (a nil value) stack traceback main.lau:6: in main chunck

There is no function audio.load()

http://docs.coronalabs.com/daily/api/library/audio/index.html

Use either audio.loadSound() or audio.loadStream()

Also, you need quotes around file names and they need proper extensions:

local GODZILLA= audio.loadSound("GodzillaMarc785758480.mp3") local groan = audio.loadSound("GroanSoundBiblecom1306380507.mp3") local FART1 = audio.loadSound("PieceOfCrapKevanGC288403955.mp3")

I strongly suggest adopting a better naming style. i.e. Follow a consistent style in your code and when naming assets:

local godzilla = audio.loadSound("godzillaMarc.mp3") local groan = audio.loadSound("groanSound.mp3") local fart1 = audio.loadSound("kevinSound.mp3")

Thank you for the help it is working but we can’t get the sound to actually play. Do we need to change or add anything else to our code?

local widget = require( "widget" ) local background = display.newImage("carbonfiber.jpg", true) -- flag overrides large image downscaling background.x = display.contentWidth / 2 background.y = display.contentHeight / 2 local soundhandle = audio.loadSound("GodzillaMarc785758480.mp3" ) local soundhandle = audio.loadSound ("GroanSoundBiblecom1306380507.mp3" ) local soundhandle = audio.loadSound ("PieceOfCrapKevanGC288403955.mp3" ) local GODZILLA = audio.loadSound ( "GodzillaMarc785758480.mp3" ) local groan = audio.loadSound ("GroanSoundBiblecom1306380507.mp3" ) local FART1 = audio.loadSound ("PieceOfCrapKevanGC288403955.mp3" ) &nbsp; local roundedRect = display.newRoundedRect( 10, 50, 300, 40, 8 ) roundedRect.anchorX, roundedRect.anchorY = 0.0, 0.0 -- simulate TopLeft alignment roundedRect:setFillColor( 0/255, 0/255, 0/255, 170/255 ) &nbsp; local t = display.newText( "Waiting for button event...", 0, 0, native.systemFont, 18 ) t.x, t.y = display.contentCenterX, 70 &nbsp; local button1Press = function( event ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.text = "O MY GOD!!!" audio.play("GodzillaMarc785758480.mp3") end &nbsp; local button1Release = function( event ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.text = "GODZILLA" end &nbsp; &nbsp; local buttonHandler = function( event ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.text = "id = " .. event.target.id .. ", phase = " .. event.phase end local button1 = widget.newButton { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; defaultFile = "buttonRed.png", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; overFile = "buttonRedOver.png", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; label = "Godzilla", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; emboss = true, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; onPress = button1Press, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; onRelease = button1Release, } local button2Press = function( event ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.text = "Um...." audio.play ( GroanSoundBiblecom ) end &nbsp; local button2Release = function( event ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.text = "...." end &nbsp; &nbsp; local buttonHandler = function( event ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.text = "id = " .. event.target.id .. ", phase = " .. event.phase end &nbsp; &nbsp; local button2 = widget.newButton { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id = "button2", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; defaultFile = "buttonYellow.png", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; overFile = "buttonYellowOver.png", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; label = "groan", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; labelColor = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default = { 51, 51, 51, 255 }, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; font = native.systemFont, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fontSize = 22, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; emboss = true, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; onPress = button2Press, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; onRelease = button2Release, &nbsp; } local button3Press = function( event ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.text = "O MY GOD!!!" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; audio.play (PieceOfCrapKevanGC) end &nbsp; local button3Release = function( event ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.text = "" end &nbsp; &nbsp; local buttonHandler = function( event ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t.text = "id = " .. event.target.id .. ", phase = " .. event.phase end &nbsp; local button3 = widget.newButton { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id = "button3", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; defaultFile = "buttonGray.png", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; overFile = "buttonBlue.png", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; label = "FART 1", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; font = native.systemFont, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fontSize = 28, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; emboss = true, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; onPress = button3Press } &nbsp; &nbsp; button1.x = 160; button1.y = 160 button2.x = 160; button2.y = 240 button3.x = 160; button3.y = 320

You dont need these three lines:

local soundhandle = audio.loadSound(“GodzillaMarc785758480.mp3” )
local soundhandle = audio.loadSound (“GroanSoundBiblecom1306380507.mp3” )
local soundhandle = audio.loadSound (“PieceOfCrapKevanGC288403955.mp3” )

GODZILLA and groan are the sound  handles.  When we give you example code, we don’t know what variable names you need, so we use descriptive variable names that we assume you’re going to replace with something that makes sense for your code.  If you only had one sound, then soundhandle would be a perfectly fine variable name.  When you have multiple sounds you have to give each variable a unique name.

The reason it’s not playing is this line:

audio.play(“GodzillaMarc785758480.mp3”)

needs to be:

audio.play( GODZILLA )

Rob