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

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?

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>

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

<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 name="wmode" value="transparent">
<embed src="/images/pool.swf" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350">

<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">

<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;}


Thanks for your help, everyone!

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.