I'm trying to build a page that has a video player in a table.
I also have 3 buttons in that table that are supposed to make 3 different videos play in that same player, depending on which button you click.
I cannot figure out how to program the buttons to make the different videos play.
The co-worker that's supposed to be "helping"with project won't tell me how to do it. He keeps wanting me to figure it out by myself. But, I do not know php, so I'm not versed in the language and I'm not able to figure it out.
These two sections of code exist on the page in the header. This "helpful" co-worker says all the elements I need are right there:
<?php
$url1 = "M1010eBwvCddHimDExsiI";
$url2 = "M1010rBwvCddDweeuzEml";
$url3 = "M1010aBwvCddljtfpdqjn";
$url4 = "M1010zBwvCddvICqpwmeo";
$url5 = "M1010vBwvCddcGuEmlBDy";
$url6 = "M1010ABwvCddovuidHjuf";
$url7 = "M1010vBwvCddcGuEmlBDy";
if( $_GET['video'] > 0 && $_GET['video'] < 8 ) {
$holder = "url" . $_GET['video'];
$startURL = $$holder;
} else {
$startURL = $url7;
}
?>
<script type='text/javascript'>
var player;
Vusion.components.on({componentAdded: vusionComponentAdded, scope: this});
function vusionComponentAdded(event) {
player = Vusion.components.get(event.id);
}
function switchVideo(slideNum)
{
toggleSlides(slideNum);
if(slideNum == "slide5") {
player.setProperty("url", "vusion://<?php echo $url5; ?>.vusion");
} else if(slideNum == "slide2") {
player.setProperty("url", "vusion://<?php echo $url2; ?>.vusion");
} else if(slideNum == "slide3") {
player.setProperty("url", "vusion://<?php echo $url3; ?>.vusion");
} else if(slideNum == "slide4") {
player.setProperty("url", "vusion://<?php echo $url4; ?>.vusion");
} else if(slideNum == "slide1") {
player.setProperty("url", "vusion://<?php echo $url1; ?>.vusion");
} else if(slideNum == "slide6") {
player.setProperty("url", "vusion://<?php echo $url6; ?>.vusion");
} else {
player.setProperty("url", "vusion://<?php echo $url7; ?>.vusion");
}
}
</script>
So, here are my 3 buttons (for slide 7, 6 and 2) . This is all I could muster and it doesn't work:
<a href="#" onclick="switchVideo("slide7")" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('killers','','/vusion/images/butt-video-killers-on.jpg',1)"><img src="/vusion/images/butt-video-killers.jpg" name="killers" width="298" height="57" border="0" id="killers" /></a>
<a href="#" onclick="switchVideo("slide6")" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Hannibal','','/vusion/images/butt-video-hannibal-on.jpg',1)"><img src="/vusion/images/butt-video-hannibal.jpg" name="Hannibal" width="298" height="53" border="0" id="Hannibal" /></a>
<a href="#" onclick="switchVideo("slide2")" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Hummingbird','','/vusion/images/butt-video-hummingbird-on.jpg',1)"><img src="/vusion/images/butt-video-hummingbird.jpg" name="Hummingbird" width="298" height="57" border="0" id="Hummingbird" /></a>
I don't even know if I'm on the right track. I think all I need is the right code inside the <a href> tag. The "helpful" dude said the URL is right there! Sorry, but "vusion://<?php echo $url5; ?>.vusion" just doesn't look like a url to me. It's like a php url or something.
This is the page in question:
VUSION
I would SO appreciate any help on this.
Thank you SO much!
Algie
Edited by Alexander, 17 December 2010 - 09:15 PM.
([code] and [php] tags where needed)


Sign In
Create Account

Back to top









