please help with "on playStopped"
Ban Nguyen
bann at sunncomm.com
Mon Aug 1 19:04:47 EDT 2005
Hello everyone,
I have a list of songs (scrolling list field "list"):
I put this script so when user select a song, then start the player
on selectionchanged
set the fileName of player "myPlayer" to the selectedtext of field
"list"
start player "myPlayer"
end selectionchanged
I put this script into the player object "myPlayer" because I want the
next songs continue to play:
on PlayStopped
local thisLine
put the hilitedLines of field "list" into thisLine --current line
set the hilitedLines of field "list" to (thisLine+1) --next line
set the fileName of player "myPlayer" to the selectedtext of field
"list"
start player "myPlayer"
end PlayStopped
For some reason, it does not work right. What it does is playing the
first song. After the first song done, it selects the second song (no
playing), then selects the third song and plays. I open the property of
player object and see in the source shows "the second song"
Could someone please help? The code looks right to me but I don't know
if I am missing anything.
Thank you
More information about the use-livecode
mailing list