home *** CD-ROM | disk | FTP | other *** search
/ Computer Music Interactif 7 / cd.iso / pc / PC / Demos / GroovMak / data1.cab / Program_Executable_Files / Media / grooveM.dxr / 00643.ls < prev    next >
Encoding:
Text File  |  1999-09-17  |  1.2 KB  |  47 lines

  1. on mouseEnter
  2.   if the visible of window "Help" then
  3.     tell window "help"
  4.       go("seq6")
  5.     end tell
  6.   end if
  7. end
  8.  
  9. on mouseLeave
  10.   if the visible of window "Help" then
  11.     tell window "help"
  12.       go("start")
  13.     end tell
  14.   end if
  15. end
  16.  
  17. on mouseUp
  18.   global gStyle, gBlue, durationList
  19.   if (field "fieldDuration" <> EMPTY) and not (the visible of window "help") then
  20.     case word 2 of field "fieldDuration" of
  21.       "bars":
  22.         set sec to 240 * integer(word 1 of field "fieldDuration") / float(field "fieldBpm")
  23.         set sec to integer(sec)
  24.         set min to sec / 60
  25.         if min = 0 then
  26.           set min to "00"
  27.         end if
  28.         if (min >= 1) and (min <= 9) then
  29.           set min to "0" & min
  30.         end if
  31.         set sec to sec mod 60
  32.         if sec = 0 then
  33.           set sec to "00"
  34.         end if
  35.         if (sec >= 0) and (sec <= 9) then
  36.           set sec to "0" & sec
  37.         end if
  38.         put min & ":" & sec & " sec" into field "fieldDuration"
  39.       "sec":
  40.         put getAt(durationList, gStyle) & "  bars" into field "fieldDuration"
  41.     end case
  42.     set the textFont of member "fieldDuration" to "IK10"
  43.     set the foreColor of member "fieldDuration" to gBlue
  44.   end if
  45.   set the editable of member "fieldBpm" to 0
  46. end
  47.