From: Matteo Nastasi (mop) Date: Sun, 18 Feb 2007 10:29:22 +0000 (+0000) Subject: aggiunta playsound X-Git-Tag: 3.0.0~317 X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=ecc7b610d0bd3d91ae4b99f036ef6e8c29a8b2ac;p=brisk.git aggiunta playsound --- diff --git a/web/brisk.phh b/web/brisk.phh index dae746b..51d8d3a 100644 --- a/web/brisk.phh +++ b/web/brisk.phh @@ -1263,6 +1263,11 @@ function show_table(&$bri, &$user, $sendstep, $is_transition, $is_again) if (!$is_again) $ret .= table_wellcome($user); + if ($is_transition && !$is_again) { // appena seduti al tavolo, play della mucca + $ret .= playsound("cow.mp3"); + } + + /* CARDS */ if ($is_transition) { // && $user->subst == "asta" superfluo $ret .= "|"; @@ -1521,4 +1526,9 @@ function validate_name($name) return (FALSE); } +function playsound($filename) +{ + return (sprintf('playsound("flasou", "%s");', $filename)); +} + ?> diff --git a/web/commons.js b/web/commons.js index 872bdc9..88b97e7 100644 --- a/web/commons.js +++ b/web/commons.js @@ -806,3 +806,16 @@ function room_checkspace(emme,tables,inpe) $("esco").innerHTML = ""; } + +function playsound(tag, sound) { + // g_withflash is a global var + if (g_withflash) { + alert("PLAYSOUND "+sound); + $(tag).innerHTML = '' + +'' + +'' + +''; + } +}