home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global adbanner, editbanner, gSoundLevel
- openXLib("MacAddict:Media:Xtras:FileIOXtraFat")
- if (gSoundLevel = 0) and (the soundLevel <> 0) then
- set gSoundLevel to 6
- end if
- set the soundLevel to gSoundLevel
- set the volume of sound 1 to 255
- set the volume of sound 2 to 255
- set the visible of sprite 6 to 0
- set the visible of sprite 14 to 0
- set the visible of sprite 15 to 0
- set the visible of sprite 16 to 0
- set the visible of sprite 17 to 0
- set the visible of sprite 21 to 0
- set the visible of sprite 25 to 0
- set the visible of sprite 26 to 0
- set the visible of sprite 27 to 0
- set the visible of sprite 32 to 0
- set the visible of sprite 33 to 0
- set the visible of sprite 36 to 0
- set the visible of sprite 37 to 0
- set the visible of sprite 45 to 0
- set the visible of sprite 46 to 0
- set the visible of sprite 47 to 0
- set the visible of sprite 48 to 0
- set the constraint of sprite 12 to 11
- end
-
- on soundswitch
- global trak
- set trak to trak + 1
- if trak = 1 then
- playtrak1()
- else
- if trak = 2 then
- playtrak2()
- else
- if trak = 3 then
- playtrak3()
- else
- if trak = 4 then
- playtrak4()
- end if
- end if
- end if
- end if
- end
-
- on playtrak1
- sound playFile 2, "MacAddict:Media:audio:track1"
- set the visible of sprite 24 to 1
- set the visible of sprite 25 to 0
- set the visible of sprite 26 to 0
- set the visible of sprite 27 to 0
- end
-
- on playtrak2
- sound playFile 2, "MacAddict:Media:audio:track2"
- set the visible of sprite 25 to 1
- set the visible of sprite 24 to 0
- set the visible of sprite 26 to 0
- set the visible of sprite 27 to 0
- end
-
- on playtrak3
- sound playFile 2, "MacAddict:Media:audio:track3"
- set the visible of sprite 26 to 1
- set the visible of sprite 25 to 0
- set the visible of sprite 24 to 0
- set the visible of sprite 27 to 0
- end
-
- on playtrak4
- global trak
- set trak to 0
- sound playFile 2, "MacAddict:Media:audio:track4"
- set the visible of sprite 27 to 1
- set the visible of sprite 24 to 0
- set the visible of sprite 25 to 0
- set the visible of sprite 26 to 0
- end
-
- on setSoundLevel whichSprite, pmin, pmax
- global gSoundLevel, gThumbPuppet
- set curpos to the locH of sprite whichSprite
- set gSoundLevel to integer((curpos - pmin) * 8 / (pmax - pmin))
- set gSoundLevel to min(max(gSoundLevel, 0), 7)
- set the soundLevel to gSoundLevel
- set gThumbPuppet to whichSprite
- return gSoundLevel
- end
-
- on setSoundPos whichSprite, pmin, pmax
- global gSoundLevel, gThumbPuppet
- set curpos to pmin + integer(gSoundLevel * (pmax - pmin) / 7)
- set curposY to the locV of sprite whichSprite
- put curposY
- puppetSprite(whichSprite, 1)
- set the locH of sprite whichSprite to curpos
- set the locV of sprite whichSprite to curposY
- updateStage()
- set gThumbPuppet to whichSprite
- return curpos
- end
-
- on clearThumb
- global gThumbPuppet
- puppetSprite(gThumbPuppet, 0)
- updateStage()
- end
-
- on stopMovie
- clearThumb()
- end
-
- on resetpuppets
- repeat with spritenum = 1 to 48
- if the puppet of sprite spritenum then
- puppetSprite(spritenum, 0)
- end if
- end repeat
- end
-