Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript Quicktime controls not working in Firefox

Status
Not open for further replies.

keteracel

Programmer
May 26, 2003
17
GB
I need to control a quicktime movie in one frame, from a control script in another frame. The only function I need to use is the SetURL function (see In IE6, this works fine. The QT manual page says that we should be able to use these functions from Netscape 7 and this page: seems to imply that the latest versions of QT are supported in firefox.

So basically, what I need is for you guys to fix this so it works in all browsers (IE5+, Opera, Firefox):

============ index.html ============
<html>
<head>
<title>frame control demo</title>
</head>
<frameset cols="*,*">
<frame src="controlframe.html" name="controlframe" scrolling="no" noresize="noresize" frameborder="1" />
<frame src="objectframe.html" name="objectframe" scrolling="no" noresize="noresize" frameborder="0" />
<noframes>
<body>
You need a frames-enabled browser to use this application. </body>
</noframes>
</frameset>
</html>

============ controlframe.html ============
<html>
<head>
</head>
<body>
<span onMouseOver="this.style.background = '#336699'; this.style.color = '#ffffff';" onMouseOut="this.style.background = '#ddeeff'; this.style.color = '#000033';" onclick="parent.objectframe.document.getElementById('movie1').SetURL('titrate.mov');" style="background: #ddeeff; color: #000033; font-weight: bold;"> Alter URL </span><br/><br/>
<span onMouseOver="this.style.background = '#336699'; this.style.color = '#ffffff';" onMouseOut="this.style.background = '#ddeeff'; this.style.color = '#000033';" onclick="parent.objectframe.document.getElementById('movie1').Stop();" style="background: #ddeeff; color: #000033; font-weight: bold;"> Stop </span>
</body>
</html>

============ objectframe.html ============
<html>
<head>
</head>
<body>
<OBJECT classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase=" id="movie1" width="340" height="280">

<PARAM name="src" value="yellow.mov">

<EMBED width="340" height="280"
src="yellow.mov"
name="movie2"
id="movie2"
enablejavascript="true">
</EMBED>
</OBJECT> <br/><br/>
<span onMouseOver="this.style.background = '#336699'; this.style.color = '#ffffff';" onMouseOut="this.style.background = '#ddeeff'; this.style.color = '#000033';" onclick="document.getElementById('movie1').SetURL('titrate.mov');" style="background: #ddeeff; color: #000033; font-weight: bold;"> Alter URL </span><br/><br/>
<span onMouseOver="this.style.background = '#336699'; this.style.color = '#ffffff';" onMouseOut="this.style.background = '#ddeeff'; this.style.color = '#000033';" onclick="document.embeds[0].Stop()" style="background: #ddeeff; color: #000033; font-weight: bold;"> Stop </span>
</body>
</html>


At the moment I can't even get it to work in Firefox with the controls in the same frame. The javascript console keeps saying:

Error: parent.objectframe.document.getElementById("movie1").Stop is not a function


Please note:

1) the actual movies used don't matter at this stage (I just downloaded two random ones for this example frameset)

2) I can't reload the frame as the actual application I'm writing does some authentication routines which take a lot of server time and, as there will be lots of users of the final system, this is not an acceptable method. i.e. I MUST be able to use the setURL() function.


Thank you in advance for your help,

keteracel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top