home *** CD-ROM | disk | FTP | other *** search
- on HdleAudioExt AName, Kanal, DLaut
- global _Audiopath, _Lautstaerke, _Audioticks
- AudioDatei = _Audiopath & AName
- _Audioticks = EMPTY
- if Kanal = 1 then
- _Audioticks = the ticks
- end if
- if not baFileExists(AudioDatei) then
- alert("Die Datei " & AudioDatei & " wurde nicht gefunden!")
- exit
- end if
- anz = AName.chars.count
- if AName.char[anz - 2..anz] = "swa" then
- member("SWASound").url = AudioDatei
- PreLoadBuffer(member("SWASound"))
- member("SWASound").volume = _Lautstaerke + DLaut
- play frame member("SWASound")
- updateStage()
- if the runMode = "Author" then
- if member("SWASound").State = 9 then
- alert("Die SWA-Datei: " & AudioDatei & " hat scheinbar einen Defekt.")
- end if
- end if
- else
- set the volume of sound Kanal to _Lautstaerke + DLaut
- sound playFile Kanal, AudioDatei
- updateStage()
- if the runMode = "Author" then
- if (soundBusy(1) = 0) and (soundBusy(2) = 0) then
- alert("Die Sound-Datei: " & _Audiopath & AName & " wurde nicht gefunden!")
- end if
- end if
- end if
- end
-
- on HdleAudioInt AName, Kanal, DLaut
- global _Lautstaerke, _Audioticks
- anz = AName.chars.count
- _Audioticks = EMPTY
- if Kanal = 1 then
- _Audioticks = the ticks
- end if
- tell the stage
- if AName.char[anz - 2..anz] = "swa" then
- member(AName).volume = _Lautstaerke + DLaut
- play frame member(AName)
- else
- set the volume of sound Kanal to _Lautstaerke + DLaut
- puppetSound(Kanal, AName)
- end if
- end tell
- end
-
- on HdleAudioStream
- if member("SWASound").State = 1 then
- tell the stage
- go(the frame)
- end tell
- end if
- end
-
- on HdleAudioSchleife
- status = member("SWASound").State
- if soundBusy(1) or ((status > 0) and (status <= 3)) then
- tell the stage
- go(the frame)
- end tell
- end if
- end
-
- on HdleAudioStop
- stop(member("SWASound"))
- tell the stage
- repeat with i = 1 to 4
- sound stop i
- puppetSound(i, 0)
- end repeat
- repeat while soundBusy(1)
- nothing()
- end repeat
- end tell
- end
-
- on HdleVideoPlay VName, Kanal, DLaut, StartP, EndP
- global _Abspieldauer, _VKanal, _Pegel
- _VKanal = Kanal
- tell the stage
- if StartP <> 0 then
- sprite(_VKanal).movieTime = StartP
- else
- sprite(_VKanal).movieTime = 1
- end if
- if EndP = 0 then
- _Abspieldauer = member(VName).duration
- else
- _Abspieldauer = EndP
- end if
- preloadMember(member(VName).number)
- updateStage()
- sprite(_VKanal).movieRate = 1
- sprite(_VKanal).volume = _Pegel + DLaut
- end tell
- end
-
- on HdleVideoSchleife
- global _Abspieldauer, _VKanal
- tell the stage
- aktZeit = sprite(_VKanal).movieTime
- if aktZeit < _Abspieldauer then
- go(the frame)
- else
- sprite(_VKanal).movieRate = 0
- updateStage()
- _Abspieldauer = 0
- end if
- end tell
- end
-
- on HdleVideostop
- global _Abspieldauer, _VKanal
- tell the stage
- if _Abspieldauer > 0 then
- sprite(_VKanal).movieRate = 0
- _Abspieldauer = 0
- end if
- end tell
- end
-