Code for next Button
on (release) { // Increase limits by 10
lowlimit = Number(lowlimit)+Number(10);
highlimit = Number(highlimit)+Number(10);
txtmain = "Processing Entries from "+lowlimit+" to "+highlimit+"
Please wait ::: ";
loadVariablesNum ("guestbook.php?lowlimit="+lowlimit+"&highlimit="+highlimit,
0);
}
Code for Previous Button
on (release) {
if (lowlimit == "0") {
txtmain = ":::: Nothing before Zero ::::";
}else{
lowlimit = Number(lowlimit) - Number(10); //
dec. limits by 10
highlimit = Number(highlimit) - Number(10);
txtmain = "Processing Entries "+lowlimit+" to "+highlimit+" Please
wait for a while :::::: ";
loadVariablesNum ("guestbook.php?lowlimit="+lowlimit+"&highlimit="+highlimit,
0);
}
}
Add three dynamic text fields to the movie for Total entries(totalentries),Low Limit (txtll) and High Limit (txthl) respectively.
Now Insert a new movie instance. Place four dynamic text boxes for name(textname) , email (txtemail) , website (txtwebsite) and comments (txtcomments). Add two buttons for Submit and Reset.
Code for Submit Button
on (release) {
if (txtname eq "") {
_root.txtmessage = "Name information missing.";
} else if (txtemail eq "") {
_root.txtmessage = "Email missing.";
} else if (txtcomments eq "") {
_root.txtmessage = "Comments missing.";
} else if (txtwebsite eq "") {
_root.txtmessage = "Enter the URL to your website";
} else {
submit= "Y"; // this variable will be used in
PHP script to determine whether the new data has submitted or not.
highlimit = 10;
lowlimit = 0;
_root.txtmain = "wait :::: Posting New Entry ::: ";
loadVariablesNum ("guestbook.php", 0, "POST"); //
send variable to PHP script
_root.txtmessage = "Comments posted";
txtname1=txtname;
gotoAndStop (2);
}
}
Code for reset button
on (release) {
txtname = "";
txtemail = "";
txtWebsite = "http://";
txtcomments = "";
}
Comments