<HTML><FONT FACE=arial,helvetica><FONT  SIZE=2>I really dislike cluttering up this list with this beginner question, but have had no success with figuring out why I cannot make this work. I have tried moving scripts and changing the orders of the handlers and have not gotten rid of this particular problem.
<BR> My intent is to be able to load a playist(field) of music titles and play them in the order they are listed. This part will work fine. The problem arises when I use the button to stop the current playlist and load a different playlist. After I stop the current playlist, I must repeat the process of loading another playlist twice. I do not know or have been able to see why.
<BR>Qusetion: Can this problem be attributed to having the process split up between handlers as a workaround for the 10 line script limitation? I am about to buy the SB license, but this has me a little worried.
<BR> So here it is folks, my whole playlist team of scripts (and some of yours as well!).
<BR>
<BR>
<BR>BTN "Load Playlist"script: Step One
<BR>on mouseUp
<BR>  global mySpot,folderPath
<BR>  put 1 into mySpot
<BR>  put the cAudioFolderPath of this stack into folderPath
<BR>end mouseUp
<BR>
<BR>
<BR>Field "playlistnames" script: Step Two The list where the names of the playlists (and the fields by the same name) are kept
<BR>on mouseUp
<BR>  global titles
<BR>  put the value of the selectedLine into titles
<BR>send mouseUp to button"playit"
<BR>end mouseUp
<BR>
<BR>
<BR>
<BR>BTN "playit"script: Step Three
<BR>
<BR>on mouseUp
<BR>  global titles
<BR>  global mySpot
<BR>  add 1 to mySpot
<BR>  put item mySpot of fld titles into audioToPlay
<BR>  put the cAudioFolderPath of this stack into folderPath
<BR>  set the filename of player"audioPlayer" to folderPath&"/"&audioToPlay
<BR>  set the currentTime of player"audioPlayer" to 0
<BR>  put audioToPlay into fld"currentplay"
<BR>  start player "audioPlayer"
<BR>end mouseUp -- All works well until I want to stop the current playlist and load a new one. The following
<BR>
<BR>
<BR>BTN "Stop Music"script: This is part of the problem. When I use this, then attempt to load another playlist, I must use "Load Playlist" again and select again before it will play. When I check the message box for the condition of my global variables, "mySpot" (which should be 1 when I load a new playlist) always contains a number too high to be used unti I repeat the process a second time.
<BR>
<BR>on mouseUp
<BR>  global titles,mySpot,folderpath
<BR>  delete global mySpot -- I was using put empty  with the same results
<BR>  delete global titles
<BR>  stop player"audioPlayer"
<BR>  set the currentTime of player"audioPlayer" to 0
<BR>  put empty into field"currentplay"
<BR>end mouseUp
<BR>
<BR>
<BR>
<BR>Player audioPlayer script:
<BR>on playStopped
<BR>  send mouseUp to button"playit"
<BR>end playStopped
<BR>
<BR>Thanks
<BR>mike</FONT></HTML>