Working to get IOS app approved and need best way (deliver the sound immediately and if possible without using the "Play" command that I am already using to play a mp3 file - I am using LC 8.02) to make sound when buttons are touched.
An example code or guidance on where to find this info would be very much appreciated.
Thanks,
David
Need best way to make sound when button are touched - Solved
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Need best way to make sound when button are touched - Solved
Last edited by DR White on Wed Aug 17, 2016 3:22 pm, edited 1 time in total.
Re: Need best way to make sound when buttons are touched
on ios you have to include the sounds you want to play, so in the "copy files" standalone setting, you point to them.
Then, you can use something like this:
Then, you can use something like this:
Code: Select all
on goodbeep howMany
if howMany is empty then put 1 into howMany
set the beepSound to path()&"goodbeep.m4a"
beep howMany
end goodbeep
on badbeep howMany
if howMany is empty then put 1 into howMany
set the beepSound to path()&"badbeep.m4a"
beep howMany
end badbeep
function path
put the filename of this stack into tFilename
set the itemDelimiter to slash
put item 1 to -2 of tFilename & slash into tPath
return tPath
end path
Re: Need best way to make sound when buttons are touched
Mikey,
That works GREAT!!
Thanks,
David
That works GREAT!!
Thanks,
David