Use flashmx to connect to aspx

Source: Internet
Author: User
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 ");
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.