Hi guys,
I play sounds in my app by doing this
local eatsound = { “sounds/eat1.wav”, “sounds/eat2.wav”, “sounds/eat3.wav”}
Basically creating a table set of strings. Which I then play by doing this.
local choice = math.random( 1, 3 )
media.playEventSound( swingsound[choice] )
This works fine. But reading the docs they reccomend playing sound by doing audio.play()
However it doesn’t seem to take in values passed via the table… so this doesn’t work:
local choice = math.random( 1, 3 )
audio.play ( swingsound[choice] )
Is there anyway to do this? Or am I just being anal retentive in following the recommendations from the API docs?
Thank you. [import]uid: 130916 topic_id: 25417 reply_id: 325417[/import]