1) SWF reads data from JSP
A)Create a dynamic text box and a button in flash. The text box is named STR and written on the button.
On (release ){
Loadvariable ("http: // localhost: 8080/demo/sentvar. jsp", "", "get ");
} // Relative URLs. It seems that all absolute paths are acceptable.
B)Write the following code in sentvar. jsp:
<% @ Page contenttype = "text/html; charset = gb2312" %>
<%
String TMP = "wowowo ";
Out. println ("& STR =" + TMP); // It must be written in the "& STR =" format, the STR name must be the same as the one you created in a, and the "=" number cannot be less;
%>
C)Test. Click button... yeah ~ (Failed? Its none of my business) Try again ~~
-------------------------------------------------------------------
2) SWF writes data to JSP
This is simple.
C. Create an input textfield. Set it to Str. A button, written above:
On (release ){
Geturl ("showrs. jsp", "", "get ");
}
B)Write in showrs. jsp:
<% @ Page contenttype = "text/html; charset = gb2312" %>
<%
String TEM = request. getparameter ("str ");
Out. println ("str =" + TEM );
%>
Everything is OK ~ Enjoy...
Lead: http://www.flashempire.net/showpost.php? P = 892409