home *** CD-ROM | disk | FTP | other *** search
- on startup
- global gDrumLength, gDrumList, gCurrentDrumBtn, gOnOff, gbanknum
- set the cpuHogTicks to 10000
- set hogcputicks to 3000
- set gbanknum to 0
- set gOnOff to 1
- set gCurrentDrumBtn to 11
- set gDrumList to the name of member 101 of castLib 2
- set gDrumLength to calculatelooplength(101)
- repeat with i = 11 to 16
- set the cursor of sprite i to [307, 308]
- end repeat
- repeat with i = 17 to 28
- set the cursor of sprite i to [303, 304]
- end repeat
- set the cursor of sprite 8 to [303, 304]
- repeat with i = 31 to 33
- set the cursor of sprite i to [307, 308]
- end repeat
- repeat with i = 1 to 3
- set the volume of sound i to 255
- end repeat
- set the keyDownScript to "checkkeydown"
- set the visible of sprite 36 to 1
- repeat with i = 2 to 7
- puppetSprite(i, 1)
- set the visible of sprite i to 0
- end repeat
- set the cursor of sprite 48 to [307, 308]
- puppetSprite(45, 1)
- set the cursor of sprite 45 to [303, 304]
- startTimer()
- end
-
- on stopMovie
- repeat with i = 11 to 22
- puppetSprite(i, 0)
- end repeat
- repeat with i = 31 to 33
- puppetSprite(i, 0)
- end repeat
- puppetSprite(42, 0)
- end
-
- on calculatelooplength castNum
- set bitdepth to the sampleSize of member castNum of castLib 2 / 8
- set Srate to the sampleRate of member castNum of castLib 2
- set Ssize to the size of member castNum of castLib 2
- set Ssize to Ssize + 0.0
- set seconds to Ssize / Srate / bitdepth
- set thelooplength to integer(seconds * 60)
- return thelooplength
- end
-