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
repeat while the mouseDown
set the memberNum of sprite 32 to the number of member "Htransf"
updateStage()
end repeat
end if
end
on mouseUp
global gfirstmarker, glastmarker, gCont, gPlaySeq, gBlue, markerList
if not (the visible of window "help") then
if count(markerList) = 25 then
openWin("Message")
tell window "Message"
go("8")
end tell
else
if not gPlaySeq and (count(markerList) < 25) and (the name of member the memberNum of sprite 11 <> "groove1") then
set the memberNum of sprite 32 to the number of member "transf"
updateStage()
repeat with i = 1 to the lineCount of member "grooveMem"
if count(markerList) = 25 then
openWin("Message")
tell window "Message"
go("8")
end tell
exit repeat
end if
append(markerList, i)
end repeat
case count(markerList) of
1, 2, 3, 4, 5, 6, 7:
repeat with i = 1 to count(markerList)
set gN to "g" & getAt(markerList, i)
set the memberNum of sprite (i + 1) to the number of member gN
updateStage()
end repeat
set gfirstmarker to 1
set glastmarker to count(markerList)
otherwise:
set j to 9
repeat with i = count(markerList) down to count(markerList) - 6
set j to j - 1
set gN to "g" & getAt(markerList, i)
set the memberNum of sprite j to the number of member gN
updateStage()
end repeat
set the memberNum of sprite 9 to the number of member "marker"
updateStage()
set gfirstmarker to count(markerList) - 6
set glastmarker to count(markerList)
end case
put EMPTY into field "fieldMarkerSeq"
repeat with i = 1 to count(markerList)
put getAt(markerList, i) & " " after field "fieldMarkerSeq"
end repeat
updateStage()
set the textFont of member "fieldMarkerSeq" to "arial"
set the textSize of member "fieldMarkerSeq" to 10
set the foreColor of member "fieldMarkerSeq" to 0
case word 2 of field "fieldDuration" of
"sec":
set sec to 1920 * the number of words in field "fieldMarkerSeq" / float(field "fieldBpm")
set sec to integer(sec)
set min to sec / 60
if min = 0 then
set min to "00"
end if
if (min >= 1) and (min <= 9) then
set min to "0" & min
end if
set sec to sec mod 60
if sec = 0 then
set sec to "00"
end if
if (sec >= 1) and (sec <= 9) then
set sec to "0" & sec
end if
put min & ":" & sec & " sec" into field "fieldDuration"
otherwise:
put 8 * the number of words in field "fieldMarkerSeq" & " bars" into field "fieldDuration"
end case
set the textFont of member "fieldDuration" to "IK10"
set the foreColor of member "fieldDuration" to gBlue