1. In your HTML, using whatever code you use to play sound, set som JS variable to indicate that the playback is over.
2. In Lectora, access the variable with JS, e.g. document.getElementById(‘transcript1′).contentWindow.isItOver.
3. You can use that in two on-timer actions every 0.1 seconds or so:
a) Run JavaScript > VarMyLectoraVariable.set(document.getElementById(‘transcript1′).contentWindow.isItOver).
b) Show undefined IF MyLectoraVariable contains "over"
Hope this helps.