PDA

View Full Version : Video Gallery(videos are not displaying)



tpravioti
10-22-2009, 12:02 PM
hi!
I want to make a video gallery(like the image gallery on this site:http://sandbox.leigeber.com/javascript-slideshow/ but with videos)...

I create it with Javascript and Html..though i can't make my videos to play!!

any suggestions??

thanks anyway!

bluewalrus
10-22-2009, 12:43 PM
Link, Code?

tpravioti
10-23-2009, 07:52 AM
here is my code, but you can't run it!!
you can see it though...take a look!!


<%@ Page Inherits="Skin" Src="active.cs" %>
<%@ Import Namespace="Active3" %>
<%@ Import Namespace="Oxygen" %>

<html>
<head>
<%= Active.Head %>
<script src="AC_RunActiveContent.js" type="text/javascript"></script>

</head>

<%
int thumbwidth=75;
int thumbheight=60;
int thumbscount=6;

int mainvideowidth=0;
int mainvideoheight=0;
mainvideowidth=thumbscount*thumbwidth+96;
mainvideoheight=mainvideowidth;
%>

<body>
<center><br/><br/>

<script>
var videos=[];
//array with videos
<% int v=0; foreach(Video x in Active.RetrieveNode(0xAB06DDDC).Videos){%>
videos[<%=v%>]={vidsrc:<%=(Js)x.RetrieveFile("video.*")%>,imgsrc:<%=(Js)x.ThumbnailSrc%>,title:<%=(Js)(""+x.Caption.Replace(Environment.NewLine,"<br/>"))%>,desc:<%=(Js)(""+x.Description.Replace(Environment.NewLine,"<br/>"))%>};
<%v++;}%>

var images=[];
//array with imagesthumbnails
<% int i=0; foreach(Video x in Active.RetrieveNode(0xAB06DDDC).Videos){%>
images[<%=i%>]={src:<%=(Js)x.ThumbnailSrc%>};
<%i++;}%>

var menucurleft=0;
var menucurnum=0;
var menutimer;

function MoveMenu(direction,enabled){
if(enabled==true){MakeMove(direction);}
else{clearTimeout(menutimer);}
}
function MakeMove(direction){
var step=10;
if($('div2').getWidth()<$('div1').getWidth())return;
if((($('div2').getWidth()-Math.abs(menucurleft))<$('div1').getWidth()) && direction=='left')return;
if(menucurleft==0 && direction=='right')return;
var l=0;if(direction=='left')l=-step;else if(direction=='right')l=step;
menucurleft=(menucurleft+l);
$('div2').style.left=menucurleft+'px';
menutimer=setTimeout("MakeMove('"+direction+"')",1);
}
</script>

<table border="0" cellpadding="0" cellspacing="5" bgcolor="#A0A0A0">
<tr>
<td width="100%" align="center" onmouseover="document.getElementById('galmenu').style.visibility='visible'" onmouseout="document.getElementById('galmenu').style.visibility='hidden'">
<div style="position:relative;width:<%=mainvideowidth%>px;height:<%=mainvideoheight%>px;">

<img src="http://192.168.3.30/a45.ianos/dat/B42D7BB2/flashvideo.flv" id="main_video" width="<%=mainvideowidth%>" height="<%=mainvideoheight%>"/>

<div id="galmenu" style="position:absolute;background-color:#686868;">
<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>
<td width="47">
<img src="skn/back.ico" id="leftbtn" height="47" width="47" align="absmiddle" onMouseOver="MoveMenu('right',true);" onmouseout="MoveMenu('right',false);" onmouseover="$('leftbtn').setStyle('opacity:1');" onmouseout="$('leftbtn').setStyle('opacity:0.8');" style="cursor: pointer;"/>
</td>
<td><div id="div1" style="border:1px solid #000000;position:relative;overflow:hidden;width:<%=(thumbwidth * thumbscount)%>px;height:<%=thumbheight%>px;">
<div id="div2" style="position:absolute;left:0xp;top:0px;">
<table cellspacing="0" cellpadding="0" border="0"><tr>
<% int k=0; foreach(Video x in Active.RetrieveNode(0xAB06DDDC).Videos){ %>
<td><img src="<%=x.ThumbnailSrc%>" id="thumb_<%=x.id.Hex%>" onmouseover="$('thumb_<%=x.id.Hex%>').setStyle('opacity:1');" onmouseout="$('thumb_<%=x.id.Hex%>').setStyle('opacity:0.5');" width="<%=thumbwidth%>" height="<%=thumbheight%>" style="cursor: pointer;"/>
</td>
<% k++;}%>
</tr></table>
</div>
</div></td>
<td width="47"><img src="skn/next.ico" id="rightbtn" height="47" width="47" align="absmiddle" onMouseOver="MoveMenu('left',true);" onmouseout="MoveMenu('left',false);" onmouseover="$('rightbtn').setStyle('opacity:1');" onmouseout="$('rightbtn').setStyle('opacity:0.8');" style="cursor: pointer;"/>
</td>
</tr>
</table>
</div>
</div>
</td>
</tr>
</table>

<script>
document.observe("dom:loaded", function() {
$('leftbtn').setStyle('opacity:0.8');
$('rightbtn').setStyle('opacity:0.8');

<%foreach(Video x in Active.RetrieveNode(0xAB06DDDC).Videos){%>
$('thumb_<%=x.id.Hex%>').setStyle('opacity:0.5');
<%}%>

$('galmenu').style.left=0+'px';
$('galmenu').style.top=10+'px';
});
</script>

<br/><br/><br/></center>

</body>
</html>

tpravioti
10-27-2009, 02:19 PM
guys anyone know something about this??