PDA

View Full Version : Help! Can't see movie when I click?


jadepearl
05-26-2008, 05:47 AM
Hi there,

Am trying this out. Wanted to create a page where I can view several swf movies in one page. Sadly, this JS does not work. What am I doing wrong?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>
<p>
<A HREF="#" onclick='return playVideo("selectDemo1","videoPlayback")'>Pool</A>
<BR>
<A HREF="#" onclick='return playVideo("selectDemo2","videoPlayback")'>Condo </A>
<BR>
<A HREF="#" onclick='document.getElementById("videoPlayback").innerHTML=""; return false'>Cancel Video</A>

</p>
<div id='videoPlayback' style='width: 435px; height:350px; background-color: #800000;'></div>

<div id='selectDemo1' style='display: none'>
<object width="425" height="350">
<param name="movie" value="pool.swf">
</param>

<param name="wmode" value="transparent">
</param>
<embed src="/images/pool.swf" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350">
</embed>
</object>
</div>

<div id='selectDemo2' style='display: none'>
<object width="425" height="350">
<param name="movie" value="condo.swf"></param>
<param name="wmode" value="transparent"></param>
<embed src="/images/condo.swf&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350">
</embed>
</object>
</div>



<script type="text/javascript">function playVideo(sourceId, targetId) {
if (typeof(sourceId)=='string') {sourceId=document.getElementById(sourceId);}
if (typeof(targetId)=='string') {targetId=document.getElementById(targetId);}
targetId.innerHTML=sourceId.innerHTML; return false;}
</script>

</body>
</html>

Thanks for your help, everyone!

pete
05-28-2008, 06:37 AM
If you can upload the page so we can see exactly what is happening that would probably prompt people to dig in and help you out. It is impossible to test without having the movies online to view.