日期:2014-05-17 浏览次数:20669 次
<asp:GridView ID="gvVideo" runat="server" AutoGenerateColumns="false" DataKeyNames="FilePath" > <Columns> <asp:TemplateField> <ItemTemplate> <table> <tr> <td> <div id="CuPlayer" style="margin-top: 20px;"> <strong>酷播迷你 (CuPlayerMiniV1.0)</strong> </div> </td> <td> 视频标题:<%#Eval("WorksName")%> </td> </tr> </table> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView>
var so = new SWFObject("/js/CuPlayerMiniV20_Black_S.swf", "CuPlayer", "120", "85", "9", "#000000"); so.addParam("allowfullscreen", "true"); so.addParam("allowscriptaccess", "always"); so.addParam("wmode", "opaque"); so.addParam("quality", "high"); so.addParam("salign", "lt"); so.addVariable("CuPlayerFile", "<%=url%>"); so.addVariable("CuPlayerShowImage", "false"); so.addVariable("CuPlayerWidth", "120"); so.addVariable("CuPlayerHeight", "85"); so.addVariable("CuPlayerAutoPlay", "false"); so.addVariable("CuPlayerAutoRepeat", "false"); so.addVariable("CuPlayerShowControl", "true"); so.addVariable("CuPlayerAutoHideControl", "false"); so.write("CuPlayer");
/// <summary> /// swf格式 /// </summary> /// <param name="url"></param> /// <param name="width"></param> /// <param name="height"></param> /// <returns></returns> private static string swf(string url, int width, int height) { System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append("<OBJECT codeBase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" "); sb.Append(" height=\"" + height + "\" width=\"" + width + "\" >"); sb.Append("<PARAM NAME=\"FlashVars\" VALUE=\"\">"); sb.Append("<PARAM NAME=\"Movie\" V