By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,712 Members | 2,063 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,712 IT Pros & Developers. It's quick & easy.

IE error when trying to use plugin methods

P: n/a
I am trying to use the methods in quicktimes plugin, but IE generetes
an error. I have tried to use the "document.all" instead of
getElementById but the results remain the same. It won't recognise
"movie1" and "movie2" as objects, and it won't allow me to use their
methods.

And of course IE generates an error message that says nothing about
what might be wrong.

Another problem with this code is that I cannot get the lenght of the
movie because it is streamed with rtsp. Any suggestions?

Here is my code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"
/>
<script language=JavaScript" type="text/javascript">

var movieEnd;
var movieNow;

</script>

<style type="text/css">
<!--

#movie1 {
position:absolute;
top:20px;
left:20px;
visibility:hidden;
}
#movie2 {
position:absolute;
top:20px;
left:20px;
visibility:visible;
}

-->

</style>
</head>
<body>
<form1><OBJECT
classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab"
width="320" height="256" id="movie2"
<PARAM name="src" value="L1M1.mov">
<PARAM name="autostart" value="false">

<EMBED HEIGHT=256 WIDTH=320
SRC="L1M1.mov"

TYPE="video/quicktime"
PLUGINSPAGE="www.apple.com/quicktime/download"

NAME="movie2" autostart="false">
<EMBED />
</OBJECT>

<OBJECT
classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab"
width="320" height="256" id="movie1" >
<PARAM name="src" value="L1M1.mov">
<PARAM name="autostart" value="false">
<EMBED HEIGHT=256 WIDTH=320
SRC="L1M1.mov"
TYPE="video/quicktime"
PLUGINSPAGE="www.apple.com/quicktime/download"

NAME="movie1" autostart="false">
<EMBED />
</OBJECT>
</form1>

<script language=JavaScript" type="text/javascript">
<!--

function changeVisibility(id,action) {
var objId = id;
switch (action) {
case "show":
document.form1.getElementById(''+id+'').style.visi bility.toLowerCase()
= "visible";}
case "hide":
document.form1.getElementById(''+id+'').style.visi bility.toLowerCase()
= "hidden";

default:return;
}
return;

}
function changePosition(id,x,y) {
document.form1.getElementById(ObjId).style.left = x+"px";
document.form1.getElementById(ObjId).style.top = y+"px";
}

/* define function that calls QuickTime's "Play" method */
function PlayIt(id)
{
if (id=="movie1") {
document.form1.movie1.Play();
} else if (id=="movie2") {
document.form1.movie2.Play();
}

}

/* define function that calls QuickTime's "Stop" method */
function StopIt(anObj)
{
if (id=="movie1") {
document.form1.movie1.Stop();
} else if (id=="movie2") {
document.form1.movie2.Stop();
}

}
function changeIfEnd(id) {
if (id=="movie1") {
while (document.form1.movie1.GetPluginStatus() == "Loading") {}

var movieEnd =document.form1.movie2.GetEndTime();
var movieNow =document.form1.movie2.GetTime();
} else if (id=="movie2") {

while (document.fomr1.movie2.GetPluginStatus() == "Loading") {}
var movieEnd =document.form1.movie2.GetEndTime();
var movieNow =document.form1.movie2.GetTime();
}

timeUntilSwitch = setTimeout("switchMovie()",(movieEnd-movieNow);

}

function switchMovie() {
PlayIt('movie1');
for (var i = 1; i <= 10000; i++) {}
changeVisibility('movie1','show');
changeVisibility('movie2','hide');

}

//-->
</script>

<P style="position:absolute;
top:400px;
left:200px;">
<br> <a href="javascript:PlayIt('movie2');" onclick="changeIfEnd('movie2');"PlayIt</a><br>

<a href="javascript:StopIt('movie2');">StopIt</a><br>
</P>

</body>
</html>

Oct 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
> "torbs" <to********@gmail.com> wrote:
news:11**********************@f14g2000cwb.googlegr oups.com....

I am trying to use the methods in quicktimes plugin, but IE generetes
an error. I have tried to use the "document.all" instead of
getElementById but the results remain the same. It won't recognise
"movie1" and "movie2" as objects, and it won't allow me to use their
methods.

And of course IE generates an error message that says nothing about
what might be wrong.
Another problem with this code is that I cannot get the lenght of the
movie because it is streamed with rtsp. Any suggestions?

Here is my code:
<snip>


line 7 column 1 - Warning: <script> unexpected or duplicate quote mark
line 37 column 1 - Warning: inserting missing 'title' element
line 41 column 1 - Error: <form1> is not recognized!
line 41 column 1 - Warning: discarding unexpected <form1>
line 41 column 8 - Error: <object> missing '>' for end of tag
line 72 column 1 - Warning: discarding unexpected </form1>
line 76 column 2 - Warning: <script> unexpected or duplicate quote mark

Error: syntax error Line: 85
Source Code: case "hide":
Expected '}'

See if any of this info helps

--
BootNic Thursday, October 13, 2005 12:47 PM

Our earth is degenerate in these latter days; bribery and corruption are common; children no longer
obey their parents; and the end of the world is evidently approaching.
*Assyrian clay tablet 2800 B.C.*
Oct 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.