Poutrelle
asked on
onclick change quicktime movie
Here is the problem I'm currently facing:
I have a web page with an image in it, on that image there are html area shapes (map) On that same page there is also a quicktime movie.
<div id="movie">
<object CLASSID="clsid:02BF25D5-8C 17-4B23-BC 80-D3488AB DDC6B" width="480" height="360" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab" id="mainmovie">
<param name="src" value="docs/movies/poort.m ov">
<param name="autoplay" value="true">
<param name="loop" value="false">
<param name="controller" value="true">
<embed src="docs/movies/poort.mov " name="mainmovie" width="480" height="360" autoplay="true" loop="false" controller="true" pluginspage="http://www.apple.com/quicktime/" enablejavascript="true"></ embed>
</object>
</div>
When the page loads the standard quicktime is loaded.
Now what I need to do is: when a shape is clicked then another movie should load instead of the standard one (in the same quicktime player)
Till now, I'v tried two ways, both unsuccessfully.
1.
Code of the area shape href: <area shape="circle" coords="458,49,8"
href="javascript:changeMov ie('Kerkho f1');">
Function changeMovie:
function changeMovie(moviename){
original_url=document.main movie.GetU RL();
alert (original_url);
url="docs/movies/"+moviena me+".mov";
alert (url);
document.mainmovie.SetURL( url);
}
This does not work, as you can see I used some alerts to see what was happening. It seems the URL is the full URL and can not be defined relatively. This should be necessary since the page can be on several undefined servers and computers. With this example I see a broken quicktime icon.
2.
Code of the area shape href: <area shape="circle" coords="458,49,8"
href="javascript:changeMov ie('docs/m ovies/Kerk hof1');">
Function changeMovie:
document.getElementById('m ovie').inn erHTML='<o bject
CLASSID="clsid:02BF25D5-8C 17-4B23-BC 80-D3488AB DDC6B" width="480"
height="360" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab"
id="mainmovie"><param name="src" value="docs/movies/Kerkhof 1.mov"><pa ram
name="autoplay" value="true"><param name="loop" value="false"><param name="controller" value="true"><embed src="docs/movies/Kerkhof1. mov"
name="mainmovie" width="480" height="360" autoplay="true" loop="false"
controller="true" pluginspage="http://www.apple.com/quicktime/"
enablejavascript="true"></ embed></ob ject>'
As you can see I simply try to change the content of the div tag. The result is the quicktime movie goes blank.
Does anyone know an descent way to be able to load a movie in an embedded quicktime player when a link is clicked?
Thanks in advance
I have a web page with an image in it, on that image there are html area shapes (map) On that same page there is also a quicktime movie.
<div id="movie">
<object CLASSID="clsid:02BF25D5-8C
<param name="src" value="docs/movies/poort.m
<param name="autoplay" value="true">
<param name="loop" value="false">
<param name="controller" value="true">
<embed src="docs/movies/poort.mov
</object>
</div>
When the page loads the standard quicktime is loaded.
Now what I need to do is: when a shape is clicked then another movie should load instead of the standard one (in the same quicktime player)
Till now, I'v tried two ways, both unsuccessfully.
1.
Code of the area shape href: <area shape="circle" coords="458,49,8"
href="javascript:changeMov
Function changeMovie:
function changeMovie(moviename){
original_url=document.main
alert (original_url);
url="docs/movies/"+moviena
alert (url);
document.mainmovie.SetURL(
}
This does not work, as you can see I used some alerts to see what was happening. It seems the URL is the full URL and can not be defined relatively. This should be necessary since the page can be on several undefined servers and computers. With this example I see a broken quicktime icon.
2.
Code of the area shape href: <area shape="circle" coords="458,49,8"
href="javascript:changeMov
Function changeMovie:
document.getElementById('m
CLASSID="clsid:02BF25D5-8C
height="360" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab"
id="mainmovie"><param name="src" value="docs/movies/Kerkhof
name="autoplay" value="true"><param name="loop" value="false"><param name="controller" value="true"><embed src="docs/movies/Kerkhof1.
name="mainmovie" width="480" height="360" autoplay="true" loop="false"
controller="true" pluginspage="http://www.apple.com/quicktime/"
enablejavascript="true"></
As you can see I simply try to change the content of the div tag. The result is the quicktime movie goes blank.
Does anyone know an descent way to be able to load a movie in an embedded quicktime player when a link is clicked?
Thanks in advance
ASKER
same problem, i get the broken quicktime logo.
Thx anyway :)
Thx anyway :)
to create the original full url you can do
original_url=document.main movie.GetU RL();
url=original_url.substring (0,origina l_url.last IndexOf('/ '))+movien ame+".mov" ;
original_url=document.main
url=original_url.substring
ASKER
after i added another "/" to the url string it seems to work:
url=original_url.substring (0,origina l_url.last IndexOf('/ '))+"/"+mo viename+". mov";
it is a work arround, maybe you know how i do not have to add that extra / ?
either way, the points are yours :)
url=original_url.substring
it is a work arround, maybe you know how i do not have to add that extra / ?
either way, the points are yours :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks, that does the trick :)
<area shape="circle" coords="458,49,8" onClick="changeMovie('Kerk