P
Peter Stickney
All -
Not one to use js extensively, so I'll give this a shot. I've got a
site that wants to have a "video journal". I figure I could just use
JS to change which video is being played. A simple dropdown menu that
onChange would pass the selected option's value and change the src of
the embed / object to the given movie, the option's value is the
filename.
I don't have much, but I'll post what I have.
Forgive me if this issue has been discussed, I had not come across in
my searches.
Thanks
-peter
//// JS Function , thus far ////
function ChangeMovie() {
if ( navigator.appName== "Netscape" )
document.embeds["TheMovie"].src=document.MovieForm.movies.options[document.MovieForm.movies.options.selectedIndex].value;
else
document.all["TheMovie"].src=document.MovieForm.movies.options[document.MovieForm.movies.options.selectedIndex].value;
}
//// Embeded QT movie ////
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="150"
width="250" ID="TheMovie">
<param name="src" value="./videos/1.mov">
<param name="autoplay" value="true">
<param name="controller" value="true">
<embed height="150" width="250" src="./videos/1.mov"
pluginspage="http://www.apple.com/quicktime/download/"
type="video/quicktime" controller="true" autoplay="true"
name="TheMovie">
</object>
//// Drop Down List ////
<form name="MovieForm">
<select name="movies" size="1" onChange="ChangeMovie();">
<option>Choose Movie</option>
<option value="2.mov">Handy</option>
</select>
</form>
Not one to use js extensively, so I'll give this a shot. I've got a
site that wants to have a "video journal". I figure I could just use
JS to change which video is being played. A simple dropdown menu that
onChange would pass the selected option's value and change the src of
the embed / object to the given movie, the option's value is the
filename.
I don't have much, but I'll post what I have.
Forgive me if this issue has been discussed, I had not come across in
my searches.
Thanks
-peter
//// JS Function , thus far ////
function ChangeMovie() {
if ( navigator.appName== "Netscape" )
document.embeds["TheMovie"].src=document.MovieForm.movies.options[document.MovieForm.movies.options.selectedIndex].value;
else
document.all["TheMovie"].src=document.MovieForm.movies.options[document.MovieForm.movies.options.selectedIndex].value;
}
//// Embeded QT movie ////
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="150"
width="250" ID="TheMovie">
<param name="src" value="./videos/1.mov">
<param name="autoplay" value="true">
<param name="controller" value="true">
<embed height="150" width="250" src="./videos/1.mov"
pluginspage="http://www.apple.com/quicktime/download/"
type="video/quicktime" controller="true" autoplay="true"
name="TheMovie">
</object>
//// Drop Down List ////
<form name="MovieForm">
<select name="movies" size="1" onChange="ChangeMovie();">
<option>Choose Movie</option>
<option value="2.mov">Handy</option>
</select>
</form>