I am trying to get the caller of a function from audio onComplete. I have tried operating on the values coming from the event but I am not having any luck.
audio.play(soundList[sound].clip, {loops = sLoops, onComplete=multipleSoundDec});
...
function multipleSoundDec(e)
for key,value in pairs(e) do
print( key, value )
end
-- What audio clip called me?
end
I thought using e.handle would get me the data but every time I try to access anything about it I get “attempt to index field ‘handle’ (a userdata value)”
I have also tried
audio.play(soundList[sound].clip, {loops = sLoops, onComplete=function() print("clip: ", self) end});
and that does not work either. Any ideas? [import]uid: 70996 topic_id: 19547 reply_id: 319547[/import]