onevoisses
14 years agoVisitor
Stop An audio player,Simple audioplayer example,no spring or
I have this simple audio player, I want to be able to stop the player without waiting until it reaches the end of the playlist
Page 89 of the component reference manual
This player do not have a springboard or detail screen.it just play once its selected.Now can anybody suggest how to stop it ."plain old make it shut up."
while true
msg = wait(0, port)
if type(msg) = "roAudioPlayerEvent"
if msg.isStatusMessage() then
'print "roAudioPlayerEvent: "; msg.getmessage()
print "playaudio | msg = "; msg.GetMessage() " | index = "; msg.GetIndex()
if msg.getmessage() = "end of playlist" return -1
else if type(msg)="roPosterScreenEvent" then
audioPlayer.stop ()
'return do not stop the player,it has to have some value
return -2
end if
end if
end while
End Sub
Page 89 of the component reference manual
This player do not have a springboard or detail screen.it just play once its selected.Now can anybody suggest how to stop it ."plain old make it shut up."
while true
msg = wait(0, port)
if type(msg) = "roAudioPlayerEvent"
if msg.isStatusMessage() then
'print "roAudioPlayerEvent: "; msg.getmessage()
print "playaudio | msg = "; msg.GetMessage() " | index = "; msg.GetIndex()
if msg.getmessage() = "end of playlist" return -1
else if type(msg)="roPosterScreenEvent" then
audioPlayer.stop ()
'return do not stop the player,it has to have some value
return -2
end if
end if
end while
End Sub