方法一:
把Flex生成的SWF文件(在目录../history/xx.swf)中,考到.NET项目(WEB)中,然后在页面上引用就可以了。如 width="100%" height="100%" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always"> 方法二:
调用.NET页面。示例如下:
在Flex文件中: width="100%" height="100%"> FLEX/Default.aspx"> {this.txtUserName.text} {this.txtUserPassWord.text} width="302" height="204" layout="absolute" textAlign="left"> width="89" height="36" fontSize="15" enabled="true" click="getuser.send()"> Default.aspx.cs: protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["username"] != null && Request.QueryString["userpassword"] != null) { if (Request.QueryString["username"].Equals("drj") && Request.QueryString["userpassword"].Equals("123")) { Response.Write("ok"); Response.Flush(); } else if (!Request.QueryString["username"].Equals("drj")) { Response.Write("uiderror"); Response.Flush(); } else if (!Request.QueryString["userpassword"].Equals("123" )) { Response.Write("pwderror"); Response.Flush(); } } }
把Flex生成的SWF文件(在目录../history/xx.swf)中,考到.NET项目(WEB)中,然后在页面上引用就可以了。如 width="100%" height="100%" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always"> 方法二:
调用.NET页面。示例如下:
在Flex文件中: width="100%" height="100%"> FLEX/Default.aspx"> {this.txtUserName.text} {this.txtUserPassWord.text} width="302" height="204" layout="absolute" textAlign="left"> width="89" height="36" fontSize="15" enabled="true" click="getuser.send()"> Default.aspx.cs: protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["username"] != null && Request.QueryString["userpassword"] != null) { if (Request.QueryString["username"].Equals("drj") && Request.QueryString["userpassword"].Equals("123")) { Response.Write("ok"); Response.Flush(); } else if (!Request.QueryString["username"].Equals("drj")) { Response.Write("uiderror"); Response.Flush(); } else if (!Request.QueryString["userpassword"].Equals("123" )) { Response.Write("pwderror"); Response.Flush(); } } }