dhawal.mhatre
05-22-2009, 03:24 AM
hi friends..
I m making a website for images and videos files.
I have to call flv files when someone clicks the thumbnail of the particular video. i have not uploaded the site yet, so for reference you can view following site :
http://www.shutterstock.com (http://www.shutterstock.com)
My site is based on same basis, providing images and videos for downloads. I have done with images but with flv its not working..
This is the coding i have done for calling flv videos which is not working......
<!--#include file="conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Media Cafe</title>
<script type="text/javascript">
function MM_CheckFlashVersion(reqVerStr,msg){
with(navigator){
var isIE = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
if (!isIE || !isWin){
var flashVer = -1;
if (plugins && plugins.length > 0){
var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
if (desc == "") flashVer = -1;
else{
var descArr = desc.split(" ");
var tempArrMajor = descArr[2].split(".");
var verMajor = tempArrMajor[0];
var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
flashVer = parseFloat(verMajor + "." + verMinor);
}
}
// WebTV has Flash Player 4 or lower -- too low for video
else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;
var verArr = reqVerStr.split(",");
var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
if (flashVer < reqVer){
if (confirm(msg))
window.location = "http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
}
}
}
}
</script>
<!--#include file="top.asp"-->
<!--#include file="left.asp"-->
<%
dim get_id
get_id=request("id")
session("ProID")=request("id")
if request("id") = "" then response.end
'strSql="select * from Product_Master where Product_id="&get_id&""
strSql = "SELECT * from Product_Master where Product_id="&get_id&" "
set RsDetails=server.CreateObject("adodb.recordset")
RsDetails.open strSql,db,3
strSql = "SELECT * from Product_Chd where Product_id="&get_id&" "
set RsChd=server.CreateObject("adodb.recordset")
RsChd.open strSql,db,3
%>
<td width="59%" valign="top"><table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="28" class="heading1"><%=RsDetails("Category")%></td>
</tr>
<tr>
<td height="121" valign="top" class="heading1"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10" colspan="3"></td>
</tr>
<tr>
<td width="55%" align="center" valign="top">
<%
if RsChd("Preview_Video") <> "" then
%>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="298" height="269" id="FLVPlayer">
<param name="movie" value="FLVPlayer_Progressive.swf" />
<param name="salign" value="lt" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Clear_Skin_3&streamName=<%=replace(RsChd("Preview_Video"),".flv","")%>&autoPlay=true&autoRewind=false" />
<embed src="FLVPlayer_Progressive.swf" flashvars="&MM_ComponentVersion=1&skinName=Clear_Skin_3&streamName=<%=replace(RsChd("Preview_Video"),".flv","")%>&autoPlay=true&autoRewind=false" quality="high" scale="noscale" width="298" height="269" name="FLVPlayer" salign="LT" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
<%
end if
%>
</td>
<td width="1%" align="left" valign="top"> </td>
<td width="44%" align="left" valign="top" class="maintxt"><strong>Description : </strong><%=RsDetails("Description")%> <br />
<strong><br />
Type : </strong><%=RsDetails("Description")%><br />
<br />
<strong>Price : </strong>$5<br />
<label>
<%
do while not RsChd.eof
response.write "<input name='Chdid"&RsChd("ID")&"' type='radio' value='"&RsChd("ID")&"' />"&RsChd("Format")&" ("&RsChd("Resolution")&" "&RsChd("Frp")&"fps)<br />"
RsChd.movenext
loop
RsChd.close
%>
</label>
<br />
<br />
<label>
<label>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type="image" name="imageField" src="images/addtocart.jpg" /></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<!--#include file="right.asp"-->
<!--#include file="bottom.asp"-->
Thanks in advance...
:):):):)
I m making a website for images and videos files.
I have to call flv files when someone clicks the thumbnail of the particular video. i have not uploaded the site yet, so for reference you can view following site :
http://www.shutterstock.com (http://www.shutterstock.com)
My site is based on same basis, providing images and videos for downloads. I have done with images but with flv its not working..
This is the coding i have done for calling flv videos which is not working......
<!--#include file="conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Media Cafe</title>
<script type="text/javascript">
function MM_CheckFlashVersion(reqVerStr,msg){
with(navigator){
var isIE = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
if (!isIE || !isWin){
var flashVer = -1;
if (plugins && plugins.length > 0){
var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
if (desc == "") flashVer = -1;
else{
var descArr = desc.split(" ");
var tempArrMajor = descArr[2].split(".");
var verMajor = tempArrMajor[0];
var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
flashVer = parseFloat(verMajor + "." + verMinor);
}
}
// WebTV has Flash Player 4 or lower -- too low for video
else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;
var verArr = reqVerStr.split(",");
var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
if (flashVer < reqVer){
if (confirm(msg))
window.location = "http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
}
}
}
}
</script>
<!--#include file="top.asp"-->
<!--#include file="left.asp"-->
<%
dim get_id
get_id=request("id")
session("ProID")=request("id")
if request("id") = "" then response.end
'strSql="select * from Product_Master where Product_id="&get_id&""
strSql = "SELECT * from Product_Master where Product_id="&get_id&" "
set RsDetails=server.CreateObject("adodb.recordset")
RsDetails.open strSql,db,3
strSql = "SELECT * from Product_Chd where Product_id="&get_id&" "
set RsChd=server.CreateObject("adodb.recordset")
RsChd.open strSql,db,3
%>
<td width="59%" valign="top"><table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="28" class="heading1"><%=RsDetails("Category")%></td>
</tr>
<tr>
<td height="121" valign="top" class="heading1"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10" colspan="3"></td>
</tr>
<tr>
<td width="55%" align="center" valign="top">
<%
if RsChd("Preview_Video") <> "" then
%>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="298" height="269" id="FLVPlayer">
<param name="movie" value="FLVPlayer_Progressive.swf" />
<param name="salign" value="lt" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Clear_Skin_3&streamName=<%=replace(RsChd("Preview_Video"),".flv","")%>&autoPlay=true&autoRewind=false" />
<embed src="FLVPlayer_Progressive.swf" flashvars="&MM_ComponentVersion=1&skinName=Clear_Skin_3&streamName=<%=replace(RsChd("Preview_Video"),".flv","")%>&autoPlay=true&autoRewind=false" quality="high" scale="noscale" width="298" height="269" name="FLVPlayer" salign="LT" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
<%
end if
%>
</td>
<td width="1%" align="left" valign="top"> </td>
<td width="44%" align="left" valign="top" class="maintxt"><strong>Description : </strong><%=RsDetails("Description")%> <br />
<strong><br />
Type : </strong><%=RsDetails("Description")%><br />
<br />
<strong>Price : </strong>$5<br />
<label>
<%
do while not RsChd.eof
response.write "<input name='Chdid"&RsChd("ID")&"' type='radio' value='"&RsChd("ID")&"' />"&RsChd("Format")&" ("&RsChd("Resolution")&" "&RsChd("Frp")&"fps)<br />"
RsChd.movenext
loop
RsChd.close
%>
</label>
<br />
<br />
<label>
<label>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type="image" name="imageField" src="images/addtocart.jpg" /></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<!--#include file="right.asp"-->
<!--#include file="bottom.asp"-->
Thanks in advance...
:):):):)