home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / programm / 14941 < prev    next >
Encoding:
Internet Message Format  |  1992-09-03  |  1.1 KB

  1. Path: sparky!uunet!cs.utexas.edu!swrinde!gatech!utkcs2!utkux1.utk.edu!danny@utkux1.utk.edu
  2. From: danny@utkux1.utk.edu (Danny W. McCampbell)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Sound Loop in a with a Modal Dialog?
  5. Message-ID: <1992Sep3.145524.8874@utkux1.utk.edu>
  6. Date: 3 Sep 92 14:55:24 GMT
  7. Sender: usenet@utkux1.utk.edu (USENET News System)
  8. Organization: University of Tennessee
  9. Lines: 24
  10.  
  11. Hi.  I want to play a sound continuously while a modal dialog is 
  12. present on the screen.  I have successfully go the loop to work
  13. without the modal dialog statement but the loop is only executed
  14. twice when I call modal dialog.  Here is  some sample code:
  15.  
  16. dialogtrue := true;
  17. while dialogtrue do
  18. begin
  19.   FlushSndChannel(mySndChan);
  20.   if SoundisStopped(mySndChan) then
  21.   begin
  22.     PlaytheSound(mySndChan);
  23.   end;
  24.   ModalDialog(nil, itemHit);            {Call Modal Dialog until the user clicks in the dialog}
  25.   if itemHit = 1 then
  26.     dialogtrue := false;
  27. end;
  28. StoptheSound(mySndChan);
  29. DisposDialog(AboutDialog);                {Dispose of the Dialog}
  30.  
  31. The sound plays only twice then stops playing.  Any ideas how I can
  32. do this successfully?  Thanks in advance.
  33.  
  34. Danny McCampbell
  35.