Hey, I am trying to set up this html page so there is a default video. When the user clicks on the links below the default video that video loads in the place where the default is. (kind of like a swap). Im having a real hard time. I would appreciate any help.
Right now I have but it doesnt work:
Right now I have but it doesnt work:
Code:
<script type="text/javascript"> function playMovie( a, href ) { // remove element if exists var container = document.getElementById( "playing" ); var flash_movie = document.getElementById( "flash_movie" ); if( flash_movie ) { container.removeChild( flash_movie ); } // create new element var embed = document.createElement( "EMBED" ); embed.setAttribute( "src", "http://origin.eastbaymedia.com/embed/player.swf" ); embed.setAttribute( "allowFullScreen", "true" ); embed.setAttribute( "allowscriptaccess", "always" ); embed.setAttribute( "flashvars", href); embed.setAttribute( "width", "500" ); embed.setAttribute( "height", "350" ); // clear out the cell cell = a.parentNode; cell.id = 'playing'; while( cell.hasChildNodes() ) { cell.removeChild( cell.firstChild ); } // insert the element into the cell cell.appendChild( embed ); } </script><p> </p><table cellspacing="5" cellpadding="3" width="200" bgcolor="#59b323" border="0"><tbody><tr><td><div id="flash_movie"><embed bgcolor="undefined" flashvars="streamer=rtmp://fms.ebmcdn.net/8004B6/origin.eastbaymedia.com&duration=00:02:12&file=nyls/flash/virtual_open_house/VOH_040309_HD.flv&image=http://origin.eastbaymedia.com/nyls/flash/thumbnails/virtual_open_house-VOH_040309_HD.flv.png?1239309765" src="http://origin.eastbaymedia.com/embed/player.swf" allowscriptaccess="always" allowfullscreen="true" width="500" height="350"></embed></div><p><span style="font-size: 12px; color: rgb(255,255,255)"><a onClick="playMovie( this, 'streamer=rtmp://fms.ebmcdn.net/8004B6/origin.eastbaymedia.com&duration=00:02:12&file=nyls/flash/virtual_open_house/VOH_040309_HD.flv&image=http://origin.eastbaymedia.com/nyls/flash/thumbnails/virtual_open_house-VOH_040309_HD.flv.png?1239309765' );" href="#">Open House Opening Video</a></span></p><p> </p></td></tr></tbody></table><p> </p><p> </p><p> </p>
Comment