A
Andrew Poulos
As a follow on to the 'fun' I had with IE I'm now trying to play sounds
using an Object tag (no Embed) in MZ. Sadly whenever 'playButton' gets
clicked MZ says that "audObj.Play is not a function":
window.onload = function() {
var audObj = document.createElement("object");
audObj.setAttribute("id", "objmedia");
audObj.setAttribute("type","audio/x-aiff");
audObj.setAttribute("data","media/aif_sample.aif");
audParam = document.createElement("param");
audParam.setAttribute("name","AutoStart");
audParam.setAttribute("value","false");
audObj.appendChild(audParam);
document.body.appendChild(audObj);
document.getElementById("playButton").onclick = function() {
audObj.Play();
//document.getElementById("objmedia").Play();
}
}
If I change AutoStart to 'true' then the audio starts playing so this
implies that the sound gets load correctly. Is there a way to get
playing to start with a mouse click?
Andrew Poulos
using an Object tag (no Embed) in MZ. Sadly whenever 'playButton' gets
clicked MZ says that "audObj.Play is not a function":
window.onload = function() {
var audObj = document.createElement("object");
audObj.setAttribute("id", "objmedia");
audObj.setAttribute("type","audio/x-aiff");
audObj.setAttribute("data","media/aif_sample.aif");
audParam = document.createElement("param");
audParam.setAttribute("name","AutoStart");
audParam.setAttribute("value","false");
audObj.appendChild(audParam);
document.body.appendChild(audObj);
document.getElementById("playButton").onclick = function() {
audObj.Play();
//document.getElementById("objmedia").Play();
}
}
If I change AutoStart to 'true' then the audio starts playing so this
implies that the sound gets load correctly. Is there a way to get
playing to start with a mouse click?
Andrew Poulos