Results 1 to 4 of 4

Thread: Video Gallery(videos are not displaying)

  1. #1
    Join Date
    Oct 2009
    Posts
    38
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Default Video Gallery(videos are not displaying)

    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!

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Link, Code?

  3. #3
    Join Date
    Oct 2009
    Posts
    38
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Default

    here is my code, but you can't run it!!
    you can see it though...take a look!!

    Code:
    <%@ 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>
    Last edited by Snookerman; 01-08-2010 at 03:47 PM. Reason: please use [CODE][/CODE] tags

  4. #4
    Join Date
    Oct 2009
    Posts
    38
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Default

    guys anyone know something about this??

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •