Thanks to undef
After some PMs and a Teamviewersession it works
Code: Select all
<quad posn="-30 -34 2" sizen="28 28" image="http://yourWEB.com/folder/screen1.png" imagefocus="http://yourWEB.com/folder/screen2.png" id="Texas" ScriptEvents="1"/>
<script><!--
main() {
declare SoundBong = Audio.CreateSound("http://yourWEB.com/folder/sound.ogg", 1.0, False, False, False);
SoundBong.Volume = 1.0;
while (True) {
// Check for MouseEvents
foreach (Event in PendingEvents) {
switch (Event.Type) {
case CMlEvent::Type::MouseClick : {
if (Event.ControlId == "Texas") {
SoundBong.Play();
}
}
}
}
yield;
}
}
--></script>
Have fun