i downloaded this..
http://www.flash-db.com/Tutorials/guestbook/index.php__
in flash: line 1- this action code:
// Default NumLow Variable
NumLow = 0;
// Stop the movie from looping..
stop();
_And in the movieclip: line 1 - this action code:
function loadEntries(act, increment) {
// Define NumLow as a Number
num = new Number(_parent.NumLow);
// Act accordingly
if(act == "Next") {
// Add increment
_parent.NumLow = num + increment;
} else if(act == "Previous") {
_parent.NumLow = num - increment;
} else {
// Load default - i.e. 0
_parent.NumLow = 0;
}
// Update Statistics
_parent.read.low.text = _parent.NumLow;
_parent.read.high.text = Number(_parent.NumLow) + 10;
// Show Please wait text
_parent.read.entries.text = "Loading entries... Please wait...";
// Begin Loading
myEntries = new LoadVars()
myEntries.ref = this
myEntries.load("GuestBook.php?action=read&r="+random(999)+"&NumLow="+_parent.NumLow)
myEntries.onLoad = function(success){
if(success){
// Assign output to components and objects
entries.text = this.entries;
totalEntries.text = this.totalEntries;
//Update values to calculate prev/next button visibility
num = Number(_parent.NumLow)
var totalEntries = Number(this.totalEntries);
var total = num+increment
//Hide/show next button
if(total<totalEntries) this.ref.next_button._visible = true;
else this.ref.next_button._visible = false
//Hide/show previous button
if(num==0) prev_button._visible = false; else prev_button._visible = true
}
}
}
// Load Default
_parent.read.loadEntries("Default", 10);
stop();