SoundChannel Event.COMPLETE

From GiderosMobile
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Available since: Gideros 2011.6
Value: complete
Defined by: SoundChannel

Description

This event is dispatched when the sound channel has finished playing.

Example

-- load a music file
local snd = Sound.new("DST-Psykick.mp3")
-- start playing the music file and store the channel
local chan = snd:play()
-- define the Event.COMPLETE function that is called when the sound
-- finishes playing
function onSoundComplete(event)
	print ("Sound complete")
end
-- add the event listener that is firing when the sound finishes playing
chan:addEventListener(Event.COMPLETE,onSoundComplete)