Click to See Complete Forum and Search --> : Help in getting .mov files to behave.


silsurf
11-11-2003, 01:33 PM
I have a pretty sparse understaning of JS, everytime I try to change or alter a script I have beeen given it turns into a disaster. Please send any thoughts.

What I would like is an embedded .mov file that only displays the poster frame and then gives the user the option to hit the "play" button thus deciding to downolad the .mov

referring URL:
http://www.interactivehank.com/docs/HankMovs.html

I have multiple .movs, I would like to create separate cells with a descrption of each and then have my "button" say "get movie now" and have the selected .mov play in a unified table cell at the top.

I tried using this script someone sent me and it works great, but I am not sure how to apply it to multiple .movs What I really want

<script>
function goMovie(){
document.getElementById('movie').innerHTML ='<embed src=\"movs/ddrclean.mov\" width=\"350\" height=\"275\" hspace=\"25\" vspace=\"25\"autostart=false align=\"middle\" border=\"0\"></embed>';
}
</script>

<div id="movie"></div>
<input type="button" name="Button" value="Button" onclick="goMovie()">

I asked for help in getting multiple .mov to display in a unique table field and the same person who generated the above script sent me this one.

I gave you a solution for a single movie. If you have more, you have to parse some parameters to the same, unique, function.
Let's presume that you have 3 movies, in directory movs, and their names are movieone.mov, movietwo.mov and moviethree.mov

Let's see:


PHP:


<html>

<head>

<script>

function_goMovie(param){

var_param;

document.getElementById('movie').innerHTML_='<embed src=\"movs/'+param+'.mov\" width=\"350\" height=\"275\" hspace=\"25\" vspace=\"25\"autostart=false align=\"middle\" border=\"0\"></embed>';

}

</script>

</head>

<body>

<div id="movie"></div>

<br><br>

<input type="button" value="Start Movie One" onclick="goMovie('movieone')"><br>

<input type="button" value="Start Movie Two" onclick="goMovie('movietwo')"><br>

<input type="button" value="Start Movie Three" onclick="goMovie('moviethree')"><br>

</body>

</html>

"You see the point? Each time you press a button, you parse a parameter to the function, a parameter which has the value (string) the same with the name of the movie you want to load. Try this way, and use your file names instead of movieone.mov, movietwo.mov and moviethree.mov"

I tried to place this script in my page, but I got overwhelmed in trying to figure out how to parse out the info for multile .mov files.

What I really want to achieve is this.

I have nine .mov files, lets say .mov1-.mov9

I want to be able to have a very simple page that has all the file names and info below and a button that says "play movie now" next to each description. When the user clicks on that button I would like to have the selected .mov file appear in a unified field above, what I mean is that I would have one "screen" for all the different movies.

Again, If you need to see the page I am playing with, here it is:


http://www.interactivehank.com/docs/HankMovs.html

Any input greatly appreciated.

Henry