because msg.getindex() is returning the index for which remote key is pressed and not the index value for your array. You could create an index variable to reflect current position, and increment or decrement that variable depending on which key is pressed.
Then:
else if msg.isRemoteKeyPressed()
if msg.GetIndex() = 4 ' < LEFT
scr.ClearButtons()
if index > 0 then index=index-1
if index=0 then index=playlist.count()-1
m.audio.SetNext(msg.GetIndex() -1)
m.audio.Play()
scr.AddButton(2, "Pause")
scr.AddButton(4, "Stop")
scr.AddButton(5, "Done")
- Joel