The Regexp class includes the following methods:Test ()
AndExec (), Regexp classTest ()
The method only checks whether the provided string contains the Matching content of the regular expression. The Exec () method checks whether the provided string matches the Regular Expression and returns an array with the following content:
Matched substring
A substring that matches any bracket group in the regular expression.
There are rich learning resources for actionscript2.0 regular expressions. in the previous article, I just started to learn about and learn more about regular expressions. For more information, see online materials. Here we recommend two links: workshop? Context?livedocs_parts&file=00000111.html. I started learning from here. Now, let's continue with the previous article to summarize some methods and instances for data interaction and communication between AS and ASP. NET.
4. Communication between AS and ASP. NET
(1) loadvars Transmission Parameters and background webpage Interaction
Create a new flash file and add four components: Two textinput instances named user and PWD, one ComboBox component named grade, one button named btnsubmit and programmed under btnsubmit:
Code
On (Release)
{
// Define the URL for Interaction
VaR Urlprefix = " Http: // localhost: 2056/website name/astest. aspx? Uid = " + _ Root. User. Text + " & Pwd = " + _ Root. pwd. Text + " & GRD = " + _ Root. Grade. getselectedindex ();
VaR Myloadvars = New Loadvars ();
Myloadvars.txt = _ Root. User. text;
Myloadvars. sendandload (urlprefix, myloadvars, " Post " ); // Sendandload Method
// If the server returns data successfully, success indicates success and true indicates success.
Myloadvars. onload = Function (Success: Boolean)
{
If (SUCCESS)
{
If (Myloadvars.txt = " Return Value " ) // Here, the "return value" is the value returned by the response. Write () method of the. aspx file.
{
// _ Root. User. Text = this.txt;
}
Else
{
// _ Root. User. Text = _ root. Grade. selecteditem. label;
}
}
Else
{
// _ Root. User. Text = "error! ";
}
}
}For more information, see http://www.klstudio.com/post/49.html
(2) Use WebService to communicate with the website background
Flash has developed a separate data component for WebService called webserviceconnector, how to use this control, see http://blog.csdn.net/songthin/archive/2006/05/31/766808.aspx
If you do not use components to communicate With WebService, see http://www.klstudio.com/post/56.html (3) xmlconnector
(3) communication between xmlconnector and website backend
For example.
Now, let's sum up here, and thank you for your selfless efforts.ProgramPersonnel's work and sharing. Work first.