Calling ASP in FLASH

Source: Internet
Author: User
Conditions required for using ASP in Flash:
1. Your ISP server must support Active Server Pages and preferably databases.
2. You should install Flash 4
3. You need a preliminary understanding of ASP.
OK. The following describes how to use it:
Database structure:
The first step is to create a database. In this example, the Access database is used, and the table name is tblStaff.
There are three fields: strID (automatic number), strKnownAs (Text), strSurname (Text ).
This is a database used to demonstrate the user name. Add some data as needed.
Step 2 is to create an animation for Flash 4:
The procedure is as follows:
1) create three text fields. They are used to display data.
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 other settings to default first.
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.
Click the Action page On Properties of the button. Click "+" and On MouseEvent. Hook the Release box.
6) click "+" and "Load/Unload Movie. Select" Load Variables Into Location"
Enter your ASP file name (such as flash. asp) in the URL input box. Select Target.
7) Finally, select Send using POST in Variables. Click "+" to set the variable.
Enter "Input" in the Variable Input box (that is, the name of the first text field)
After all the above work is completed, you should see the following content in the action box:
On (Release)
Load Variables ("flash. asp", "", vars = POST)
Set Variable: "Input" = ""
End On
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

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.