Philip wrote:
I have just tried my website with Firefox v1.0 and when I try to load
a movie using:
document.getElementByID('MovieID').LoadMovie(0, 'MovieURL');
the browser tells me that LoadMovie is not a recognized function.
This works fine on IE6.
I doubt it,
document.getElementByID(...)
should give you an error in both browsers.
If you have document.getElementById 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="Windows 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.embeds && document.embeds.embedName &&
document.embeds.embedName.LoadMovie) {
document.embeds.embedName.LoadMovie(...);
}
else if (document.getElementById) {
var obj = document.getElementById('objectId');
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/