Sound Effects / Alerts

 
 
 
First step is to enable sound for your dashboard page
 
1. Right click on the page
 
2. Select "Page Properties"
 
3. Change the "play_sound": "Y"
 
4. Add your own sound URLs into the sound list.
 
Sound list is an array mapping between the sound name and the sound wav file.
 
So if you have a cashregister sound wav file you can give a name to it say "jingle" and associate with the wav file URL.
 
Below are some references to sound files stored on a public dropbox.
 
Please use your own sound files and make sure you have the appropriate copyright. Some of the sound files are downloaded from free public resources and since we cannot directly reference the owner's website they are hosted on dropbox (the owner has instructions to download and then host anywhere you want)
 
example
 
"jingle" : "path to jingle.wav"
"bomb" : "path to bomb.wav" and so on
 
 
 
 
  1. "auto_refresh":"Y",
  2. "refresh_on_start":"N",
  3. "refresh_rate_seconds":2,
  4. "show_custom_background":"N",
  5. "background_css":"{\"background-image\":\"url(http://farm8.staticflickr.com/7240/7011616439_f93181254b_b.jpg)\",\"background-size\": \"100%\"}",
  6. "sound_list":{"coin":"http://dl.dropbox.com/u/39897697/cashreg.wav","laugh":"http://dl.dropbox.com/u/39897697/laugh_x.wav","drumroll":"http://dl.dropbox.com/u/39897697/drumroll.wav"},
  7. "play_sound":"Y",
  8. "show_social_buttons":"Y"
 
 
Once you define the sound files in your page properties and enable the sound playing ability you can now use the following method to make a sound
 
Example
 
Define a icon that uses the simulation counter
 
 
In the Javascript section simply call the playsound function
 
 
The sound will be played everytime the dashboard refreshes and  only in presentation mode.
 
You can add conditional sound playing
 
if (glb["_new"] % 3 == 0)
{
  this.playsound("coin");
}
 
So the above snippet will play sound only when the counter value is divisible by 3.
 
 
Reference : To use the following wav files, just add to the sound list of the page properties and use the name in playsound
 
NOTE: Some wav files are not playable in Firefox and other browsers. So please test them
 
The following sound wav files are hosted at dropbox
 
http://dl.dropbox.com/u/39897697/ahem_x.wav
http://dl.dropbox.com/u/39897697/air_raid.wav
http://dl.dropbox.com/u/39897697/cashreg.wav
http://dl.dropbox.com/u/39897697/charge.wav
http://dl.dropbox.com/u/39897697/coin.wav
http://dl.dropbox.com/u/39897697/drumroll.wav
http://dl.dropbox.com/u/39897697/explode.wav
http://dl.dropbox.com/u/39897697/honk_x.wav
http://dl.dropbox.com/u/39897697/laser.wav
http://dl.dropbox.com/u/39897697/laugh_cough.wav
http://dl.dropbox.com/u/39897697/laugh_x.wav
http://dl.dropbox.com/u/39897697/metal_crunch.wav
http://dl.dropbox.com/u/39897697/morse_x.wav
http://dl.dropbox.com/u/39897697/peeeooop_x.wav
http://dl.dropbox.com/u/39897697/success.wav
http://dl.dropbox.com/u/39897697/zag_x.wav
Use online Web Dashboards in the cloud or download and host your own Dashboards