日期:2014-05-19  浏览次数:20452 次

.net怎么与flash 交互问题(求助/求助)
谁知道.net怎么与flash   交互啊,我用post方法发送的值,flash怎么能得到啊,并且flash发送的值,在.net中用request也接收不到,代码如下:
<form   id= "form1 "   runat= "server "   method= "get "   action= "Default3.aspx ">
        <div>
                <input   id= "name "   type= "hidden "   name= "name "     runat= "server "/>
               
                <asp:Button   ID= "Button1 "   runat= "server "   OnClick= "Button1_Click "   Text= "Button "   /> <object   classid= "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 "   codebase= "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0 "   width= "800px "   height= "600px "> <param   name= "movie "   value= "flash/Untitled-5.swf "   /> <param   name= "quality "   value= "high "   />
                        <embed   src= "flash/Untitled-5.swf "   quality= "high "   pluginspage= "http://www.macromedia.com/go/getflashplayer "   type= "application/x-shockwave-flash "   width= "800px "   height= "600px "> </embed>
          </object>
        </div>
        </form>
CS代码:string   bb   =   Request[ "some "].Trim();


------解决方案--------------------
轉帖:
你好好研究一下Flash里面的ExternalInterface的类,下面有一个简单的例子,都是Flash帮助里面的:
Flash部分:
import flash.external.*;

var methodName:String = "goHome ";
var instance:Object = null;
var method:Function = goToMacromedia;
var wasSuccessful:Boolean = ExternalInterface.addCallback(methodName, instance, method);

var txtField:TextField = this.createTextField( "txtField ", this.getNextHighestDepth(), 0, 0, 200, 50);
txtField.border = true;
txtField.text = wasSuccessful.toString();

function goToMacromedia() {
txtField.text = "http://www.macromedia.com ";
getURL( "http://www.macromedia.com ", "_self ");
}

JavaScript部分:
<form>
<input type= "button " onclick= "callExternalInterface() " value= "Call ExternalInterface " />
</form>
<script>
function callExternalInterface() {
thisMovie( "externalInterfaceExample ").goHome();
}

function thisMovie(movieName) {
if (navigator.appName.indexOf( "Microsoft ") != -1) {
return window[movieName]
}
else {
return document[movieName]
}
}
</script>
------解决方案--------------------
你可以看這篇文章,有詳細的例子和Demo源碼,http://www.codeproject.com/useritems/TTS.asp
------解决方案--------------------
这个话题不错,帮顶,学习
------解决方案--------------------
mark
------解决方案--------------------
ExternalInterface这个可以实现
在js里面 调用flash的某个as函数!