Firefox Problems with Flash LoadMovie()

P

Philip

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 need to change the movie depending on the
buttons that the user presses, all on the same page.

Is the only way to do this by changing the innerHTML of the 'MovieID'
object?

Thanks
 
P

Phillip Parr

you're capitalising the d in getElementById... try using it in lowercase.
Maybe that'll help?
 
M

Martin Honnen

Philip said:
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.
 
P

Philip

Martin Honnen said:
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.


Thanks Martin - your example works perfectly.
Of course when I said getElementByID I meant getElementById!
Firefox is looking good - decent error messages and better browsing, I
can't think of a reason for using IE. Microsoft have <90% of the share
now, and Firefox seems to have taken over as number 2 browser.

Philip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top