<span>// do this to skip flash block handling for now. See the <ahref="../flashblock/"title="SoundManager 2 flashblock handling demo"onclick="if (!document.domain) this.href=this.href+'index.html'">flashblock demo</a> when you want to start getting fancy.</span>
soundManager.useFlashBlock = false;
<span>// disable debug mode after development/testing..</span>
<p>It's good to let users see the flash component of SM2, so those with flash blockers can unblock it and allow SM2 to start. For more info on this, see the <ahref="../flashblock/"title="SoundManager 2 with Flash block handling"onclick="if (!document.domain) this.href=this.href+'index.html'">Flashblock</a> example.</p>
<h2>Making SM2 wait for window.onload()</h2>
<p>If you prefer to have the library wait for window.onload() before calling soundManager.onload()/onerror() methods, you can modify SM2's "waitForWindowLoad" property:</p>
<p>SoundManager 2 will write to a debug <div> element or a javascript console if available, by default. To disable it, simply set the relevant property to false:</p>
<code>soundManager.debugMode = false;</code>
<p>To see related configuration code, refer to the source of this page which basically does all of the above "for real."</p>
<h2>Troubleshooting</h2>
<p>If SM2 is failing to start and throwing errors due to flash security, timeouts or other issues, check out the <ahref="../../doc/getstarted/#troubleshooting"title="SoundManager 2 troubleshooting tool"onclick="if (!document.domain) this.href=this.href.replace(/\#/,'index.html#')">troubleshooting tool</a> which can help you fix things.</p>
<h2>No-debug, compressed version of soundmanager2.js</h2>
<p>Once development is finished, you can also use the "minified" (down to 10% of original size with gzip!) version of SM2, which has debug output and comments removed for you: <ahref="../../script/soundmanager2-nodebug-jsmin.js">soundmanager2-nodebug-jsmin.js</a>. Serve with gzip compression wherever possible for best bandwidth savings.</p>