Zitat
Begin fth_soundanlage
Short status
Short button
short OnActivate
if ( MenuMode == 1 )
Return
endif
If ( OnActivate == 1 )
MessageBox "Play", "Track 01", "Track 02", "Track 03", "Track 04", "Nix" ;hier wird nach titel gefragt der gespielt werden soll
Set Status to 1
Set OnActivate to 0
endif
if ( Status == 1)
set button to GetButtonPressed
if ( button == -1 )
return
elseif ( button == 0 ) ;button 0-4 starten eine wave-datei. wenn button 5 gewählt wird,wird der laufende sound gestopt oder die frage auf 0 gestellt falls kein sound läuft
PlaySound, "fth_sound_01"
set status to 0
elseif ( button == 1 )
PlaySound, "fth_sound_02"
set status to 0
Elseif ( button == 2 )
PlaySound, "fth_sound_03"
set status to 0
Elseif ( button == 3 )
PlaySound, "fth_sound_04"
set status to 0
Elseif ( button == 4 )
PlaySound, "fth_sound_05"
set status to 0
Elseif ( button == 5 )
StopSound "fth_sound_01";alle anderen sounds werden gestoppt
StopSound "fth_sound_02"
StopSound "fth_sound_03"
StopSound "fth_sound_04"
set status to 0
endif
endif
End
...