Some of the previously collected data---Using ASP technology in Flash

Source: Internet
Author: User
Using ASP technology in Flash
Use the conditions required by ASP in Flash:
1. Your ISP's server must support active Server pages and it is best to support the database
2. You should install Flash 4
3. Need you to have a preliminary understanding of ASP
OK, here's how to use this:
Database structure:
The first step is to build a database. Use an Access database in the example, with the table named Tblstaff
There are three fields: Strid (AutoNumber), Strknownas (text), Strsurname (text).
This is a database used to demonstrate the user name, just add some data.
The second step is to create a Flash 4 animation Rom:
The steps are as follows:
1) To create three text field. They're used to display data.
2 sets the name of the first text field to input, which is used to receive the input data
3 The other two text field is named Knownas and surname respectively.
4 Other settings first for the default
5 Finally, select Add a button from the Flash library (should be a reusable component Scrollbarbutton).
This is a very important step, the button will pass the input variables to the ASP page
Click the Action page on the button's properties. Click the + sign and on MouseEvent. Check the release box.
6 Click the "+" number and Load/unload Movie again. Select "Load Variables into Location"
Enter your ASP filename (for example, flash.asp) in the URL input box. Select target.
7 Finally, select the send using POST in variables. Click the + sign to set the variable
Enter "Input" in the Variable input box (the name of the first text field)
When the above work is done, you should see the following in Action box:
On (release)
Load Variables ("flash.asp", "" ", Vars=post)
Set Variable: "Input" = ""
End on
This way, when the button is clicked and released during the animation, the contents of the input box are passed to the flash.asp file.
Note that the form is a post way to pass variables.
8 now create an HTML page that contains this Flash animation file
Step three: Code for ASP files
<%
Set Connection = Server.CreateObject ("ADODB. Connection ")
Set Recordset = Server.CreateObject ("ADODB.") Recordset ")
Connection.Open "People" ' Your database-connected DSN
SQL = "SELECT * from Tblstaff WHERE strid=" & Request.Form ("Input") & ";"
Recordset.Open sql,connection,1,2
If recordset.eof Then
Knownas = "not"



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.