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"