home *** CD-ROM | disk | FTP | other *** search
- property mySoundTrack, mySoundTrackChannel
-
- on new me, aSoundTrack
- mySoundTrackChannel = 1
- sound(mySoundTrackChannel).volume = 250
- if not voidp(aSoundTrack) then
- getSoundTrack(me, aSoundTrack)
- end if
- return me
- end
-
- on getSoundTrack me, aSoundFile
- mySoundTrack = aSoundFile
- sound playFile mySoundTrackChannel, mySoundTrack
- end
-
- on stepFrame me
- if not soundBusy(mySoundTrackChannel) then
- if not voidp(mySoundTrack) then
- getSoundTrack(me, mySoundTrack)
- end if
- end if
- end
-
- on makeFX me, aMember
- aChannel = me.emptyChannel()
- sound(aChannel).volume = 100
- puppetSound(aChannel, aMember)
- return aChannel
- end
-
- on emptyChannel me
- channel = 2
- repeat with channel = 1 to 7
- if not soundBusy(channel + 1) then
- channel = channel + 1
- exit repeat
- end if
- end repeat
- return channel
- end
-
- on reset me
- myChannel = VOID
- repeat with n = 1 to 8
- sound(n).stop()
- end repeat
- end
-