Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
Step 1: create a database. In this example, an Access database is used. The table name is tblStaff and has three fields: strID (automatic number), strKnownAs (Text), and strSurname (Text ). This is a database used to demonstrate the user name. Just add some data.
Step 2: create an animation for Flash 4:
The procedure is as follows:
1) create three text fields for data display.
2) set the name of the first text field to Input, which is used to receive Input data.
3) the other two text fields are named KnownAs and Surname respectively.
4) set the default value for other settings.
5) Finally, select a button (it should be a reusable component ScrollBarButton) from the Flash library ). This is an important step. The button will pass the input variables to the ASP page to the Properties of the button. Click the Action page and click "+" and On MouseEvent, check the Release box.
6) click "+" and "Load/Unload Movie" again, select "Load Variables Into Location", and enter your ASP file name (such as flash) in the URL input box. asp), select Target.
7) Finally, select Send using POST in Variables and click "+" to set the variable. Enter "Input" in the Variable Input box (that is, the name of the first text field). After all the work is completed, you should see the following content in the action box:
Load Variables ("flash. asp", "", vars = POST)
Set Variable: "Input" = ""
In this way, when this button is clicked and released during the animation process, the content in the Input box will be passed to the flash. asp file. Note that form uses the post method to pass variables.
8) create an HTML page that contains the Flash animation file.
Step 3: ASP file code
<% Set Connection = Server. CreateObject ("ADODB. Connection ")
Set Recordset = Server. CreateObject ("ADODB. Recordset ")
Connection. Open "people" 'your database Connection DSN
SQL = "SELECT * FROM tblStaff WHERE strID =" & Request. Form ("Input ")&
Recordset. Open SQL, Connection, 1, 2
If Recordset. EOF Then
KnownAs = "Not"
Surname = "Found"
KnownAs = Recordset ("strKnownAs ")
Surname = Recordset ("strSurname ")
End If Recordset. Close
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to firstname.lastname@example.org. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
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:
and provide relevant evidence. A staff member will contact you within 5 working days.