Issue with HTMLEmbedElement in Netscape
Posted: Mon Dec 28, 2009 7:01 am
Hi
I'm new to Actionscript(2.0).
I'm facing an issue with Netscape browsers when I'm trying to pass a value to flash through JavaScript.
Here I am copying the js code bellow
<script language="javascript">
function getFlashMovieObject(movieName)
{
if (window.document[movieName])
{
return window.document[movieName];
}
if (navigator.appName.indexOf("Microsoft Internet")==-1)
{
if (document.embeds && document.embeds[movieName])
return document.embeds[movieName];
}
else
{
return document.getElementById(movieName);
}
}
}
function showMyColor(pad,text){
var flashmovie = getFlashMovieObject(object id);
flashmovie.SetVariable("/:pad_color",pad);
flashmovie.SetVariable("/:write",text);
}
</script>
It is working fine with IE and the expected result will come when an alert is executed in the beginning of 'getFlashMovieObject' function.
Why it is so?
Sorry for my bad English.
Thank you in advance.
I'm new to Actionscript(2.0).
I'm facing an issue with Netscape browsers when I'm trying to pass a value to flash through JavaScript.
Here I am copying the js code bellow
<script language="javascript">
function getFlashMovieObject(movieName)
{
if (window.document[movieName])
{
return window.document[movieName];
}
if (navigator.appName.indexOf("Microsoft Internet")==-1)
{
if (document.embeds && document.embeds[movieName])
return document.embeds[movieName];
}
else
{
return document.getElementById(movieName);
}
}
}
function showMyColor(pad,text){
var flashmovie = getFlashMovieObject(object id);
flashmovie.SetVariable("/:pad_color",pad);
flashmovie.SetVariable("/:write",text);
}
</script>
It is working fine with IE and the expected result will come when an alert is executed in the beginning of 'getFlashMovieObject' function.
Why it is so?
Sorry for my bad English.
Thank you in advance.