I'm needing to use a table listener for the audio.play onCompletion callback, but I haven't been able to figure out what the method name should be. I think I've tried the obvious choices--anyone know?
- Stephen
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
I'm needing to use a table listener for the audio.play onCompletion callback, but I haven't been able to figure out what the method name should be. I think I've tried the obvious choices--anyone know?
- Stephen
Sorry, that feature fell through the cracks. I'm not sure if it works. Try "soundCompletion". You are the first to ask about it after all this time.
I tried soundCompletion and it did not appear to work. I try to avoid table listeners preferring to use anonymous functions instead, but those don't pass well in parameter lists. I've worked around it for now but a table listener had seemed the more logical choice.
Will closures work for you?
http://blog.anscamobile.com/2011/02/using-closures-in-lua-to-avoid-global-variables-for-callbacks/
That's basically what I ended up doing.