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 / 00498.ls < prev    next >
Encoding:
Text File  |  1999-09-17  |  3.6 KB  |  108 lines

  1. on mouseEnter
  2.   if the visible of window "Help" then
  3.     tell window "help"
  4.       go("seq2")
  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 mouseDown
  18.   global gPlaySeq, markerList
  19.   if not gPlaySeq and (count(markerList) < 25) and (the name of member the memberNum of sprite 11 <> "groove1") and not (the visible of window "help") then
  20.     repeat while the mouseDown
  21.       set the memberNum of sprite 32 to the number of member "Htransf"
  22.       updateStage()
  23.     end repeat
  24.   end if
  25. end
  26.  
  27. on mouseUp
  28.   global gfirstmarker, glastmarker, gCont, gPlaySeq, gBlue, markerList
  29.   if not (the visible of window "help") then
  30.     if count(markerList) = 25 then
  31.       openWin("Message")
  32.       tell window "Message"
  33.         go("8")
  34.       end tell
  35.     else
  36.       if not gPlaySeq and (count(markerList) < 25) and (the name of member the memberNum of sprite 11 <> "groove1") then
  37.         set the memberNum of sprite 32 to the number of member "transf"
  38.         updateStage()
  39.         repeat with i = 1 to the lineCount of member "grooveMem"
  40.           if count(markerList) = 25 then
  41.             openWin("Message")
  42.             tell window "Message"
  43.               go("8")
  44.             end tell
  45.             exit repeat
  46.           end if
  47.           append(markerList, i)
  48.         end repeat
  49.         case count(markerList) of
  50.           1, 2, 3, 4, 5, 6, 7:
  51.             repeat with i = 1 to count(markerList)
  52.               set gN to "g" & getAt(markerList, i)
  53.               set the memberNum of sprite (i + 1) to the number of member gN
  54.               updateStage()
  55.             end repeat
  56.             set gfirstmarker to 1
  57.             set glastmarker to count(markerList)
  58.           otherwise:
  59.             set j to 9
  60.             repeat with i = count(markerList) down to count(markerList) - 6
  61.               set j to j - 1
  62.               set gN to "g" & getAt(markerList, i)
  63.               set the memberNum of sprite j to the number of member gN
  64.               updateStage()
  65.             end repeat
  66.             set the memberNum of sprite 9 to the number of member "marker"
  67.             updateStage()
  68.             set gfirstmarker to count(markerList) - 6
  69.             set glastmarker to count(markerList)
  70.         end case
  71.         put EMPTY into field "fieldMarkerSeq"
  72.         repeat with i = 1 to count(markerList)
  73.           put getAt(markerList, i) & " " after field "fieldMarkerSeq"
  74.         end repeat
  75.         updateStage()
  76.         set the textFont of member "fieldMarkerSeq" to "arial"
  77.         set the textSize of member "fieldMarkerSeq" to 10
  78.         set the foreColor of member "fieldMarkerSeq" to 0
  79.         case word 2 of field "fieldDuration" of
  80.           "sec":
  81.             set sec to 1920 * the number of words in field "fieldMarkerSeq" / float(field "fieldBpm")
  82.             set sec to integer(sec)
  83.             set min to sec / 60
  84.             if min = 0 then
  85.               set min to "00"
  86.             end if
  87.             if (min >= 1) and (min <= 9) then
  88.               set min to "0" & min
  89.             end if
  90.             set sec to sec mod 60
  91.             if sec = 0 then
  92.               set sec to "00"
  93.             end if
  94.             if (sec >= 1) and (sec <= 9) then
  95.               set sec to "0" & sec
  96.             end if
  97.             put min & ":" & sec & "  sec" into field "fieldDuration"
  98.           otherwise:
  99.             put 8 * the number of words in field "fieldMarkerSeq" & "  bars" into field "fieldDuration"
  100.         end case
  101.         set the textFont of member "fieldDuration" to "IK10"
  102.         set the foreColor of member "fieldDuration" to gBlue
  103.       end if
  104.     end if
  105.   end if
  106.   set the editable of member "fieldBpm" to 0
  107. end
  108.