home *** CD-ROM | disk | FTP | other *** search
/ Passport / passport.iso / pc / passport / record.dxr / 00017.ls < prev    next >
Encoding:
Text File  |  1998-01-26  |  923 b   |  39 lines

  1. on mouseUp
  2.   global gRecording, DlgRec, HDDir, gSoundObj
  3.   if gRecording then
  4.     stop()
  5.   end if
  6.   sound stop 1
  7.   sound stop 2
  8.   if the machineType = 256 then
  9.     set Ext to ".WAV"
  10.   else
  11.     set Ext to ".AIFF"
  12.   end if
  13.   set result to SetSoundType(gSoundObj, "file", HDDir & the text of field "File" & Ext, "record")
  14.   if result <> 0 then
  15.     alert("ERROR: " & result && HDDir & the text of field "File" & Ext)
  16.   else
  17.     updateStage()
  18.     set the rect of sprite 4 to rect(237, 28, 359, 43)
  19.     if objectp(gSoundObj) then
  20.       set err to Record(gSoundObj)
  21.       if err <> 0 then
  22.         alert("Recording Error")
  23.       else
  24.         if listp(DlgRec) then
  25.           set i to integer(char 4 to 5 of the text of field "File")
  26.           if not voidp(i) then
  27.             setAt(DlgRec, i, 1)
  28.           end if
  29.         end if
  30.         set gRecording to 1
  31.         startTimer()
  32.       end if
  33.     end if
  34.   end if
  35. end
  36.  
  37. on mouseDown
  38. end
  39.