为你而来

aspnet企业级开发:asp.net与flex的结合

file->export->release....(在flex builder 3开发环境中)

在弹出对话框的下一步,选择你要导出的mxml文件,选择导出的目录

然后把导出的各类文件,全部复制到visual studio 中,选择项目右键粘贴即可。

  1 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="3-4.aspx.cs" Inherits="_3_4" %>
  2 
  3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4 
  5 <html xmlns="http://www.w3.org/1999/xhtml">
  6 <head runat="server">
  7 <!--#################这些代码复制于导出的flex项目的html文件######################################-->
  8 <link rel="stylesheet" type="text/css" href="history/history.css" />
  9 <!--  END Browser History required section -->
 10 
 11 <title></title>
 12 <script src="AC_OETags.js" language="javascript"></script>
 13 
 14 <!--  BEGIN Browser History required section -->
 15 <script src="history/history.js" language="javascript"></script>
 16 <!--  END Browser History required section -->
 17 <script language="JavaScript" type="text/javascript">
 18 <!--
 19     // -----------------------------------------------------------------------------
 20     // Globals
 21     // Major version of Flash required
 22     var requiredMajorVersion = 9;
 23     // Minor version of Flash required
 24     var requiredMinorVersion = 0;
 25     // Minor version of Flash required
 26     var requiredRevision = 28;
 27     // -----------------------------------------------------------------------------
 28 // -->
 29 </script>
 30 <!--#################这些代码复制于导出的flex项目的html文件##########################-->
 31 </head>
 32 <body>
 33     <form id="form1" runat="server">
 34     <div>
 35     <!--######################这些代码复制于导出的flex项目的html文件#####################-->
 36     <div style="border:dashed 1px #aaaaaa;width:650px;height:450px;">
 37     <!--上面新增的div标签,可以将其缩小到合适的大小,把它所包含的代码,复制到开发网页的
 38     其他位置亦可-->
 39 <script language="JavaScript" type="text/javascript">
 40 <!--
 41     // Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
 42     var hasProductInstall = DetectFlashVer(6, 0, 65);
 43 
 44     // Version check based upon the values defined in globals
 45     var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
 46 
 47     if (hasProductInstall && !hasRequestedVersion) {
 48         // DO NOT MODIFY THE FOLLOWING FOUR LINES
 49         // Location visited after installation is complete if installation is required
 50         var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
 51         var MMredirectURL = window.location;
 52         document.title = document.title.slice(0, 47) + " - Flash Player Installation";
 53         var MMdoctitle = document.title;
 54 
 55         AC_FL_RunContent(
 56         "src", "playerProductInstall",
 57         "FlashVars", "MMredirectURL=" + MMredirectURL + '&MMplayerType=' + MMPlayerType + '&MMdoctitle=' + MMdoctitle + "",
 58         "width", "100%",
 59         "height", "100%",
 60         "align", "middle",
 61         "id", "sample6_9",
 62         "quality", "high",
 63         "bgcolor", "#869ca7",
 64         "name", "sample6_9",
 65         "allowScriptAccess", "sameDomain",
 66         "type", "application/x-shockwave-flash",
 67         "pluginspage", "http://www.adobe.com/go/getflashplayer"
 68     );
 69     } else if (hasRequestedVersion) {
 70         // if we've detected an acceptable version
 71         // embed the Flash Content SWF when all tests are passed
 72         AC_FL_RunContent(
 73             "src", "sample6_9",
 74             "width", "100%",
 75             "height", "100%",
 76             "align", "middle",
 77             "id", "sample6_9",
 78             "quality", "high",
 79             "bgcolor", "#869ca7",
 80             "name", "sample6_9",
 81             "allowScriptAccess", "sameDomain",
 82             "type", "application/x-shockwave-flash",
 83             "pluginspage", "http://www.adobe.com/go/getflashplayer"
 84     );
 85     } else {  // flash is too old or we can't detect the plugin
 86         var alternateContent = 'Alternate HTML content should be placed here. '
 87       + 'This content requires the Adobe Flash Player. '
 88        + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
 89         document.write(alternateContent);  // insert non-flash content
 90     }
 91 // -->
 92 </script>
 93 <noscript>
 94       <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 95             id="sample6_9" width="100%" height="100%"
 96             codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
 97             <param name="movie" value="sample6_9.swf" />
 98             <param name="quality" value="high" />
 99             <param name="bgcolor" value="#869ca7" />
100             <param name="allowScriptAccess" value="sameDomain" />
101             <embed src="sample6_9.swf" quality="high" bgcolor="#869ca7"
102                 width="100%" height="100%" name="sample6_9" align="middle"
103                 play="true"
104                 loop="false"
105                 quality="high"
106                 allowScriptAccess="sameDomain"
107                 type="application/x-shockwave-flash"
108                 pluginspage="http://www.adobe.com/go/getflashplayer">
109             </embed>
110     </object>
111 </noscript>   
112     </div>
113     <!--###################这些代码复制于导出的flex项目的html文件#####################-->
114     </div>
115     </form>
116 </body>
117 </html>

 

 

 

posted on 2012-09-18 01:19  为你而来  阅读(516)  评论(0编辑  收藏  举报

导航