搜索引擎的对swf文件的预览界面设计 .

 最近在做一个搜索引擎的东西,自己做了一个预览swf文件的界面:能够播放swf格式的文件。

 

<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%@ page contentType="text/html;charset=GBK"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String swffileID =(String)request.getAttribute("swffileID");
String url = (String)request.getAttribute("url");
String downloadurl = url;
String kind =(String)request.getAttribute("kind");
String describe = (String)request.getAttribute("describe");
String author = (String)request.getAttribute("author");
String title =(String)request.getAttribute("title");
url = url.substring(0,url.lastIndexOf("/"));
url = url + "/Dreamers/converResource/" + swffileID + ".swf";
url = url.replace("resources/","");
%>
<%=url %>
<!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=GBK" />
<title>SWFObject 2 static publishing example page</title>
  <meta http-equiv="Content-Type" content="text/html; charset=GBK" />
  <script type="text/javascript" src="swfobject.js"></script>
  <script type="text/javascript">
  swfobject.registerObject("myId", "9.0.0", "expressInstall.swf");
  </script>
</head>
<body onunload=SeeYouLater()>
<form action="close.action?title=<%=title%>" method="post" name="form1">
<input type="hidden" name="time" >
</form>
<script language="JavaScript">
pageOpen = new Date();
function SeeYouLater() {
pageClose = new Date();
minutes = (pageClose.getMinutes() - pageOpen.getMinutes());
seconds = (pageClose.getSeconds() - pageOpen.getSeconds());
time = (seconds + (minutes * 60));
form1.time.value=time;
document.form1.submit();
} 
</script>
<div>
  <table width="1299" height="593" border="0" >
              <tr>
                <td td height="129" colspan="2" bgcolor="#66ccff"> </td>
              </tr>
              <tr>
                <td width="1006" height="133" rowspan="4" ><object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="950" height="800">
                  <param name="movie" value="<%=url%>" />
                  <!--[if !IE]>-->
                  <object type="application/x-shockwave-flash" data="<%=url%>" width="950" height="800">
                    <!--<![endif]-->
                    <div>
                      <h1>Alternative content</h1>
                      <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
                    </div>
                    <!--[if !IE]>-->
                  </object>
                  <!--<![endif]-->
                </object></td>
                <td width="277" bgcolor="#99ffff"><a href="download.action?downFileName=<%=downloadurl%>"><img src="pic19864video.jpg" alt="下载" /></a></td>
              </tr>
              <tr>
                <td height="98"    bgcolor="#99ffff">标题:<%=title %></td>
              </tr>
              <tr>
                <td height="138"   bgcolor="#99ffff">作者:<%=author %></td>
              </tr>
              <tr>
                <td height="138"   bgcolor="#99ffff">描述:<%=describe %></td>
              </tr>
            </table>
      <table align="center">
              <tr>
                <td></td>
              </tr>
  </table>
    <br />
            </center>
</div>
</body>
</html>


你可能感兴趣的:(搜索引擎的对swf文件的预览界面设计 .)