Philip wrote:
I have just tried my website with Firefox v1.0 and when I try to load
a movie using:
document.getEle mentByID('Movie ID').LoadMovie( 0, 'MovieURL');
the browser tells me that LoadMovie is not a recognized function.
This works fine on IE6.
I doubt it,
document.getEle mentByID(...)
should give you an error in both browsers.
If you have document.getEle mentById then that is a different thing.
As for scripting Flash or other plugins, it depends on how you embed the
plugin, but usually people have
<object id="objectId" classid="Window s class id here">
<embed name="embedName ">
</object>
where the <object> is for MSIE/Windows and the <embed> for browsers like
Firefox or Mozilla or Opera implementing the old Netscape plugin API.
Then for those browsers you can script
if (document.embed s && document.embeds .embedName &&
document.embeds .embedName.Load Movie) {
document.embeds .embedName.Load Movie(...);
}
else if (document.getEl ementById) {
var obj = document.getEle mentById('objec tId');
if (typeof obj.LoadMovie != 'undefined') {
obj.LoadMovie(. ..);
}
}
Of course scripting plugins depends on the plugin exposing an API to
script, there are old Flash version that don't expose an API to
Mozilla/Firefox.
--
Martin Honnen
http://JavaScript.FAQTs.com/