How to implement a Flash + ASP message board?

xiaoxiao2021-03-06  63

How to implement a Flash ASP message board?

-------------------------------------------------- -------------

Below is a tutorial you wrote before, ASP and Flash are interacting, if you use ASP to operate Access, that change is very changed, no words, the last face teach you how to read Access

-------------------------------------------------- -------------------

The content implemented in this tutorial: analog login, the viewer inputs the username and password from Flash, verified by the ASP page, and then returns the correct flag. (Note: User name is Arbiter, password is 123456)

First, the ASP page is as follows:

<%

UserName = Request.form ("UID") 'Number of variables submitted from Flash

Password = Request.form ("PWD") '

'Judging the username and password is correct

IF username = "arbiter" and password = "123456" THEN

'Transfer variable to Flash Flag

Response.write ("Flag =" Server.urlencode ("YES"))))

Else

Response.write ("Flag =" Server.urlencode ("no"))

END IF

%>

Then the Flash file section:

1. Create three layers in the home scene, named MCS, AS, Label, respectively

2. Set 4 keyframes each layer

3. Label Name of Label Name, Label Name, Label Name, 2 Key Frame Label Name is "Check", the third Label Name is "pass", the 4th keyframe Label Name is "WRONG "

4. MCS layer 1st key frame put two input input boxes, one Variable called UID (user name), a Variable called the PWD (password), and a certaintable button, the button's AS is:

On (Release) {

Loadvariables ("Test.asp", "", "Post");

GotoAndStop ("Check");

}

Then the second key frame has only one determination button, and the AS is as follows:

On (Release) {

// Variables that get from Test.asp Flag

Nowflag = flag;

IF (nowflag == "yes") {

GotoAndStop ("pass");

} Else {

GotoAndStop ("WRONG");

}

}

The third key frame has only one sentence: "You have successfully logged in!"

The fourth keyframe has a word: "Enter the username or password is wrong, please return and re-enter.", And a return button, the button's AS is:

On (Release) {

GotoAndStop ("login");

}

5. Finally, the AS layer, each of the keyframes is: stop ();

At this point, you have completed this flash, output the SWF file, put it in an HTML file, put the space that supports the ASP with the Test.asp file (or uses this PWS / IIS) to test.

If there is a mistake, please point out.

-------------------------------------------------- -

Read Access:

Set conn = server.createObject ("adoDb.connection")

Conn.open "provider = microsoft.jet.Oledb.4.0; data source =" & server.mappath ("Database Name")

SET RS = Server.createObject ("AdoDb.Recordset")

Rs.Open "SELECT * FROM Name", conn, 0, 1

Response.write ("Test =" Server.urlencode (RS ("Field Name"))))))

This will transmit a variable called Test to Flash, which is the content of the field read.

转载请注明原文地址:https://www.9cbs.com/read-111529.html

New Post(0)