by ytamano, 12/11/2008 10:49 PMHi Johanna. My book template does automate the hiding of the "next page" button on the last page. There isn't a way to completely automate the adding of additional pages, i.e. there's not way to add an action that says "add another page". My template just tells people to use the "Save As" function to create an additional page, and my "next page" buttons have actions that automatically go to the next page provided that you number them sequentially (page1, page2, etc). The actions to do this are a bit complicated. The basic idea is that I use a variable to keep track of the page number, ie. on the cover you could do something like this:
Assign Variable pagenumber= 0
Then on your "next page" button, you could put these actions:
Assign Variable nextpage = pagenumber
Adjust Variable nextpage = nextpage + 1
Adjust Variable pagenumber = pagenumber+1
Change Board "page{nextpage}"
This will jump to the next page, provided I call the pages "page1", "page2", etc.
On page 1, you would put the same actions except leave out the Assign Variable pagenumber = 0, since the pagenumber was already adjust before coming to this page.
With the buttons programmed this way, you can do a Save As and keep adding pages and they will automatically be linked.
As far as making the "next page" button disappear on the last page, I did this through checking the value of a remote variable on the next board. So in this example, if I have a variable "nextpage" that stores the page number of the next page, then I can do the following action:
If svboardname@page{nextpage} =
Set Button Properties [hide the next page button]
Then @-sign means you want to check the system variable of another board or button. svboardname@page{nextpage} checks to see if there is a board name for the board "page{nextpage}", and if the board doesn't exist, then it returns a blank value. You could also accomplish the same thing by checking to see if there is a certain button on the board "page{nextpage}", by checking svbuttonname@button@page{nextpage}. This checks the button name of the button named "button", located on the board "page{nextpage}.
Doing these kinds of checks does get a little messy but lets you automate things more.