1)swf從jsp讀數(shù)據(jù)
a) 在flash中建一個動態(tài)文本框,一個button;文本框名字叫str,button上寫
on (release) {
loadVariable("http://localhost:8080/demo/sentVar.jsp", "","get");
}//url相對,絕對路徑好像都可以
b) 在sentVar.jsp中寫如下代碼:
<%@ page contentType="text/html;charset=gb2312"%>
<%
String tmp="wowowo";
out.println("&str="+tmp);//這里一定要寫成"&str="的形式,&一定不能少,str的名字要與你a中建的相同,“= ”號也不能少;
%>
c)測試。click button ...yeah~(failed?its none of my business)
try again~~
-------------------------------------------------------------------
2)swf向jsp寫數(shù)據(jù)
這個簡單點。
c建一input textfield,起個名字str吧。一個button,上面寫:
on (release) {
getURL("showrs.jsp", "","get");
}
b)showrs.jsp中寫:
<%@ page contentType="text/html;charset=gb2312"%>
<%
String tem=request.getParameter("str");
out.println("str="+tem);
%>
everything is ok~enjoy...
引自:http://www.flashempire.net/showpost.php?p=892409
a) 在flash中建一個動態(tài)文本框,一個button;文本框名字叫str,button上寫
on (release) {
loadVariable("http://localhost:8080/demo/sentVar.jsp", "","get");
}//url相對,絕對路徑好像都可以
b) 在sentVar.jsp中寫如下代碼:
<%@ page contentType="text/html;charset=gb2312"%>
<%
String tmp="wowowo";
out.println("&str="+tmp);//這里一定要寫成"&str="的形式,&一定不能少,str的名字要與你a中建的相同,“= ”號也不能少;
%>
c)測試。click button ...yeah~(failed?its none of my business)

-------------------------------------------------------------------
2)swf向jsp寫數(shù)據(jù)
這個簡單點。
c建一input textfield,起個名字str吧。一個button,上面寫:
on (release) {
getURL("showrs.jsp", "","get");
}
b)showrs.jsp中寫:
<%@ page contentType="text/html;charset=gb2312"%>
<%
String tem=request.getParameter("str");
out.println("str="+tem);
%>
everything is ok~enjoy...
引自:http://www.flashempire.net/showpost.php?p=892409