Charles Schreiber wrote: > I would like to have a set of buttons that play files containing > several minutes of music. I would like the user to be able to change > the music that is playing by clicking a different button, but when a > previously clicked button is selected again, have the previous music > resume where it left off rather than starting over. > > I poked around a bit in some sound-related examples, but didn't find > anything, probably because I wasn't sure what I was looking for. I > was under the impression that I should be going about this using > QuickTime, but if there is an easier approach, I'm happy to use it. > > Could someone point me toward the SIMPLEST method of re-starting a > sound file where it was stopped? Check out the demo in FBtoC Examples > Sound > Play Sound file > Play Sound file. It shows how to play a sound file as a QuickTime "movie", and should be a useful starting point for development. The demo sound is played synchronously, which isn't what you want. But movies can be stopped and started as often as you please. As well as maintaining the appropriate global state so as to know what movie (if any) is currently running, consider changes along the lines of this pseudocode sketch local fn BeginMusic( theFile ) OpenMovieFile( the File ... ) NewMovieFromFile( @theSound, ... ) CloseMovieFile( ... ) GoToBeginningOfMovie( theSound ) StartMovie( theSound ) end fn local fn KeepMusicPlaying( theSound ) // call at least 10/s long if ( _false == fn IsMovieDone( theSound ) ) MoviesTask( theSound, 0 ) xelse DisposeMovie( theSound ) end if end fn local fn PauseMusic( theSound ) if ( _false == fn IsMovieDone( theSound ) ) then StopMovie( theSound ) end fn Robert P.