Hello,
In line 8 below, I am trying to set the content of the iframe, but
receive an error.
Movie 2 plays normally.
Movie 1 fails.
This example is from the QuickTime docs. (example
1-4)http://developer.apple.com/documenta...ipt/index.html
Does anyone know what might be the problem?
thanks,
Anil
---------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>Simple QuickTime Movie Controls</title>
<script language="JavaS cript"/* define function that calls
QuickTime's "Play" method */ function PlayIt(anObj) { anObj.Play(); }
/* define function that calls QuickTime's "Stop" method */ function
StopIt(anObj) { anObj.Stop(); } function GeneratePlayer( ) {
alert("in \"GeneratePlaye r()\"");
window.frames['testIframe'].innerHTML = "<object
classid=\"clsid :02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\"
codebase=\"http ://www.apple.com/qtactivex/qtplugin.cab\" id=\"movie1\"
height=\"160\" width=\"180\"<p aram name=\"src\" value=\"C:\Prog ram
Files\QuickTime \Sample.mov\"<e mbed src=\"C:\Progra m
Files\QuickTime \Sample.mov\" type=\"video/quicktime\"
pluginspage=\"w ww.apple.com/quicktime/download\" name=\"movie1\"
enablejavascrip t=\"true\" height=\"160\" width=\"180\"></object>";
}
</script>
</head>
<body>
<pThis page uses JavaScript to control a QuickTime movie... </p>
<div align="center">
<table>
<tbody>
<tr>
<td width="200"<ifr ame id="testIframe "
name="testIfram e"></iframe<a
href="javascrip t:GeneratePlaye r();">GenerateP layer()</a><br>
<pMovie1 </p>
</td>
<td width="200"<obj ect
classid="clsid: 02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab"
id="movie2" height="160" width="180"<par am
name="src" value="C:\Progr am Files\QuickTime \Sample.mov">
<embed src="C:%5CProgr am%20Files%5CQu ickTime%5CSampl e.mov"
type="video/quicktime"
pluginspage="ww w.apple.com/quicktime/download" name="movie2"
enablejavascrip t="true" height="160" width="180"></object>
<pMovie2 </p>
</td>
</tr>
</tbody>
</table>
</div>
<p>Pass movie name as a parameter to JavaScript functions defined
locally: <br>
<a href="javascrip t:PlayIt(docume nt.movie1);">Pl ayIt(movie1)</a><br>
<a href="javascrip t:StopIt(docume nt.movie1);">St opIt(movie1)</a><br>
<a href="javascrip t:PlayIt(docume nt.movie2);">Pl ayIt(movie2)</a><br>
<a href="javascrip t:StopIt(docume nt.movie2);">St opIt(movie2)</a><br>
</p>
<p>Control movie by name directly: <br>
<a href="javascrip t:document.movi e1.Play();">mov ie1.Play()</a><br>
<a href="javascrip t:document.movi e1.Stop();">mov ie1.Stop()</a><br>
<a href="javascrip t:document.movi e2.Play();">mov ie2.Play()</a><br>
<a href="javascrip t:document.movi e2.Stop();">mov ie2.Stop()</a><br>
</p>
<p>Replace a movie by name directly: <br>
<a
href="javascrip t:document.movi e1.SetURL('MyOt her.mov');">mov ie1.SetURL(MyOt her.mov)</a><br>
<a
href="javascrip t:document.movi e1.SetURL('My.m ov');">movie1.S etURL(My.mov)</a><br>
<a
href="javascrip t:document.movi e2.SetURL('MyOt her.mov');">mov ie2.SetURL(MyOt her.mov)</a><br>
<a
href="javascrip t:document.movi e2.SetURL('My.m ov');">movie2.S etURL(My.mov)</a><br>
</p>
</body>
</html>