Pre loading sounds

I have an app that reads a database and randomly selects an item from the database. Each item in the database is associated with an image and a sound file that have the same names. I would like to pre load the audio files but don’t want to pre load all the audio files. Here is the code I am trying to pre load with.

-- get word from content data object   
local word = content[playOrder[currQuestion]].word   
audioFile = audio.loadSound( {content[playOrder[currQuestion]].id..".mp3"} )  

I must be doing something wrong because when I try to use audio.playSound I am not able to play the audioFile

Am I headed in the right direction?

Thanks [import]uid: 73307 topic_id: 20306 reply_id: 320306[/import]

Don’t put curly braces around {content[playOrder[currQuestion]].id…".mp3"} in your loadSound call. That means you are trying to give the function an array instead of a string.
[import]uid: 7563 topic_id: 20306 reply_id: 79350[/import]

Aww yes!

Thank you very much, works like a champ now!

[import]uid: 73307 topic_id: 20306 reply_id: 79519[/import]