In the following code there are buttons in the flash which i am trying to make it accessible by html buttons. so when record button is pressed the mode will be “record” and the record_functions() is called.I am able get it working on Firefox but in internet explorer the buttons wont seem to work i.e, the flash functions cannot be called from internet explorer. please let me know how to resolve this issue
function thisMovie(movieName)
{
if (window.document[movieName])
{
return document.getElementById(movieName);
}
if (navigator.appName.indexOf("Microsoft Internet")==-1)
{
if (document.embeds && document.embeds[movieName])
return document.embeds[movieName];
}
else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
{
return document.getElementById(movieName);
}
}
function record_functions(mode)
{
if(mode == "record")
{
thisMovie("audiorecoding").startRecording();
}
else if(mode == "stop")
{
thisMovie("audiorecoding").stopRecording();
}
else if(mode == "play")
{
thisMovie("audiorecoding").playRecording();
}
else if(mode == "pause")
{
thisMovie("audiorecoding").pauseRecording();
}
}
<input type="button" onclick="record_functions('record')" value="Record" />
You should take your swf by an
idattribute on IE, but by anameattirbute in other browsers.