The method of connecting flashmx to aspx is probably using the following method. As for the form, the value is response. write is written in the following way, separated by the & symbol, so that the action script can be read. Let's take a look.
Principle:
1. After the flash link index. aspx, make the aspx file output a plain text string. (Excluding any HTML Tag)
For example: <% response. Write ("ID = archon & var2 = 123") %>
2. After onload is used successfully, obtain the value.
Lv = new loadvars ();
LV. Load ("http: // xxxxxxx/index. aspx ");
LV. onload = function (sucess ){
If (sucess ){
Trace ("file loaded successfully ");
Trace (LV. ID); // obtain the archon
Trace (LV. var2); // get 123
}
} Else {
Trace ("failed to load aspx file ");
}
// Another method is sendandload (post can be used to avoid passing the 255-character limit with get)
Rcv_lv = new loadvars (); // receives the returned message!
Send_lv = new loadvars (); // pass the variable of the window body
Send_lv.userid = "001"; // parameters to be passed to index. php (same as index. aspx? Userid = 001)
Send_lv.var2 = "002"; // parameters to be passed to index. php (same as index. aspx? Var2 = 002)
Send_lv.sendandload ("http: // xxxxxxx/index. aspx", rcv_lv, "Post ");
LV. onload = function (sucess ){
If (sucess ){
Trace ("file loaded successfully ");
Trace (rcv_lv.id); // obtain the archon
Trace (rcv_lv.var2); // get 123
}
} Else {
Trace ("failed to load aspx file ");
}