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.Pla y is not a function":
window.onload = function() {
var audObj = document.create Element("object ");
audObj.setAttri bute("id", "objmedia") ;
audObj.setAttri bute("type","au dio/x-aiff");
audObj.setAttri bute("data","me dia/aif_sample.aif" );
audParam = document.create Element("param" );
audParam.setAtt ribute("name"," AutoStart");
audParam.setAtt ribute("value", "false");
audObj.appendCh ild(audParam);
document.body.a ppendChild(audO bj);
document.getEle mentById("playB utton").onclick = function() {
audObj.Play();
//document.getEle mentById("objme dia").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.Pla y is not a function":
window.onload = function() {
var audObj = document.create Element("object ");
audObj.setAttri bute("id", "objmedia") ;
audObj.setAttri bute("type","au dio/x-aiff");
audObj.setAttri bute("data","me dia/aif_sample.aif" );
audParam = document.create Element("param" );
audParam.setAtt ribute("name"," AutoStart");
audParam.setAtt ribute("value", "false");
audObj.appendCh ild(audParam);
document.body.a ppendChild(audO bj);
document.getEle mentById("playB utton").onclick = function() {
audObj.Play();
//document.getEle mentById("objme dia").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
Comment