Home :: Tutorials :: SVG :: Miscellaneous
The following is an example of how to play a WAV file in Adobe's SVG plug-in. Please note that you can also play MP3 files with their plug-in.
In contast, to the other examples in SVG Basics, I have included the <svg> element in the code below. I felt this was necessary since you must declare a new namespace to use the plug-in's sound capabilites.
<svg xmlns:a="http://www.adobe.com/svg10-extensions" a:timeline="independent"> <a:audio xlink:href="ding.wav" begin="0s" /> </svg>
The begin attribute can be used to initiate a sound using events. For instance, the following example will cause a sound to play when the circle is clicked.
<svg xmlns:a="http://www.adobe.com/svg10-extensions" a:timeline="independent"> <a:audio xlink:href="ding.wav" begin="play.click" /> <circle id="play" cx="25" cy="25" r="10" fill="red"/> </svg>