Reputation: 969
function getFlashMovieObject(movieName) {
debugger;
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName]
}
else { return document[movieName] }
}
function helloJS() {
document.getElementById('myFlashMovie').helloAS("HI");
}
<object width="425" height="344">
<embed src="testing.swf" type="application/x-shockwave-flash" width="425" height="344" id="myFlashMovie"></embed>
</object>
I am calling action script function this way, this is working fine in mozilla but throwing error in IE.
Upvotes: 0
Views: 1056
Reputation: 969
I found answer of my question. i.e.
Try to embed flash this way and you'll be able to call function.
<script type="text/javascript">
swfobject.embedSWF("Flash/testing.swf", "myContent", "500", "500", "9.0.0", "Flash/expressInstall.swf");
</script>
Upvotes: 0
Reputation: 11
Inside your getFlashMovieObject
function, you have window[movieName]
and document[movieName]
. I would not expect either of these to work. You will have more luck with the line that you commented out: var v= document.getElementById("MoveName");
Upvotes: 1