问题描述
在下面的代码中有闪光灯中的按钮,我试图让它通过html按钮访问。所以当按下记录按钮的模式将是记录和 record_functions()
被调用。我能够得到它在Firefox的工作,但在Internet Explorer中按钮不会看起来工作即闪光灯功能不能从Internet Explorer中调用。请让我知道如何解决此问题
$ p $ 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);
$ b函数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 =buttononclick =record_functions('record')value =Record/>
c> id 属性,但在其他浏览器中通过名称
attirbute。
if(navigator.appName.indexOf(Microsoft)== -1)
swfObject = document [mozillaEmbedName];
else
swfObject = window [ieObjectID];
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 id
attribute on IE, but by a name
attirbute in other browsers.
if (navigator.appName.indexOf("Microsoft") == -1)
swfObject = document["mozillaEmbedName"];
else
swfObject = window["ieObjectID"];
这篇关于获取IE对象来控制闪光灯按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!