472,791 Members | 979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,791 software developers and data experts.

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 4795
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Huw Lloyd | last post by:
I am developing a windows application and want to display a flash animation in a splash screen. I have the .fla file but i dont know how to load it into the shockwave flash object that I have on...
2
by: Dominic Willems | last post by:
Having looked through the archives, I haven't found a solution that worked, so I'll try my luck by posting my problem in here: Following HTML works flawlessly in IE but doesn't in Firefox. The...
3
by: UJ | last post by:
I've got a flash object on a Window's form. At some point I want to change the flash file that is playing. But it doesn't seem to want to do it. I've done a stop on the control, changed the name of...
1
by: jrockhill | last post by:
I am using the pop up image viewer code (from this site) for flash.swf files. This works very nicely in all browsers (Mac and PC) except Firefox on a PC. (it does work in firefox on a MAC). Can...
1
by: terrybali | last post by:
Hi Guys I am new to forum and nontechnical. My site has several large flash files. I am looking for someone who can help us solve two problems. Willing to pay whatever normal rate is for this...
1
by: patronise | last post by:
My problem is that I'm wrestling to make the LoadMovie and UnloadMovie functions work for me. Here is the layout of my flash file: I've got several seperate flash files and I can jump to any one of...
0
by: deepakNagpal | last post by:
hi, friends, i got stuck in a problem, where i am not able to load the swf files in the another swf files through xml file, running online in ie browser. 1. There are two button on the stage...
0
by: Intios | last post by:
Hi, this is my story, I am very new with flash and xml so please forgive the stupid questions, I have a flash carousel and need to link the images to a url, I tried everything I can think about, can...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.