Flash Message Board Making

Source: Internet
Author: User

This article is mainly about the production of Flash message board and provide Flash message board source files and asp+flash message Board The ultimate goal is to let you use the flash to make a message board well, first look at the message page Picture it.

Now to see the flash file inside the ActionScript first frame action

Stop ();
var loadlv:loadvars = new Loadvars ();
Tijiao.onrelease = function () {
if (Nichen_txt = = "" | | Liouyan_txt.text = = "") {
Xianshi_txt.text = "What is called or message content can not be empty";
} else {
Loadlv.username = Nichen_txt.text;
Loadlv.word = Liouyan_txt.text;
Loadlv.sendandload ("http://127.0.0.1/liouyan.asp", LOADLV, "post");
}
};
Removetip.onrelease = function () {
Nichen_txt.text = "";
Liouyan_txt.text = "";
};
Xianshi.onrelease=function () {
gotoAndStop (2);
}
Loadlv.onload = function (Success:boolean) {
if (success) {
Nichen_txt.text = "";
Liouyan_txt.text = "";
Xianshi_txt.text = this.username+ "Say" +this.word;
} else {
Trace ("Load failed");
}
};
The first frame of the code is mainly used to message verification I think you should understand, we now look at the second frame code.

Stop ();
var maxnum:number = 5;
var num:number = 1;
prev_btn.enabled = false;
Next_btn.enabled = true;
var userarray:array = new Array ();
var infoarray:array = new Array ();
var myxml:xml = new XML ();
Myxml.ignorewhite = true;
Myxml.onload = function (Success:boolean) {
if (success) {
var root:xmlnode = This.firstchild;
for (var i = 0; i<root.childnodes.length; i++) {
Userarray.push (Root.childnodes[i].firstchild.firstchild);
Infoarray.push (Root.childnodes[i].lastchild.firstchild);
}
for (var i = maxnum* (num-1); i<maxnum*num; i++) {
_root["Mytextarea" +i%maxnum].text = "nickname" +userarray[i]+ "published a message, the content is" +infoarray[i ";
}
} else {
Mytextarea.text = "Error";
}
};
Myxml.load ("http://127.0.0.1/xmlxianshi.asp");
Prev_btn.onrelease = function () {
num = num-1;
Next_btn.enabled = true;
if (num>=0) {
for (var i = maxnum* (num-1); i<maxnum*num; i++) {
_root["Mytextarea" +i%maxnum].text = "nickname" +userarray[i]+ "published a message, the content is" +infoarray[i ";
}
} else {
prev_btn.enabled = false;
}
};
Next_btn.onrelease = function () {
num = num+1;
Prev_btn.enabled = true;
if (maxnum*num<userarray.length) {
for (var i = maxnum* (num-1); i<maxnum*num; i++) {
_root["Mytextarea" +i%maxnum].text = "nickname" +userarray[i]+ "published a message, the content is" +infoarray[i ";
}
else if (maxnum*num>userarray.length) {
for (Var j=0;j<5;j++) {
_root["Mytextarea" +j].text = "";
}
for (var i = maxnum* (num-1); i<userarray.length; i++) {
_root["Mytextarea" +i%maxnum].text = "nickname" +userarray[i]+ "published a message, the content is" +infoarray[i ";
}
next_btn.enabled = false;
} else {
next_btn.enabled = false;
}
};
This is mainly to analyze the XML file and send the data to your ASP file to save to the database

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.