468,107 Members | 1,469 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,107 developers. It's quick & easy.

Firefox Problems with Flash LoadMovie()

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
Jul 23 '05 #1
3 4650
you're capitalising the d in getElementById... try using it in lowercase.
Maybe that'll help?

"Philip" <ph********@lycos.co.uk> wrote in message
news:32*************************@posting.google.co m...
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

Jul 23 '05 #2


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/
Jul 23 '05 #3
Martin Honnen <ma*******@yahoo.de> wrote in message news:<41***********************@newsread4.arcor-online.net>...
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.

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
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Huw Lloyd | last post: by
2 posts views Thread by Dominic Willems | last post: by
3 posts views Thread by UJ | last post: by
1 post views Thread by jrockhill | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.