Thickness of book

Hi,

I am implementing an interactive book for the iPad. My problem is that I do not know how to go about showing the thickness of how many pages the reader has read. For example, at the beginning of the book we would see that the book is thick on the right side and thin on the left side, midway through the book we’d see that the left and right hand side have the same thickness, etc

Does anyone have any idea how I should go about it?

Thanks!

Heya, from what I understand from your question you want to know how much of the book is read? If so you could do something like this:

    float activePage = 1; // Readers current active page.
    float bookTotal = 150;// Total amount of pages in the book.
    float pageValue = 100 / bookTotal; // 100% divided by number of pages to get a single page % value.
    float bookRead = activePage * pageValue; // Current % value of the book read.
    float bookLeft = 100 - bookRead; // The % value of book left to read.

Then you could use bookRead as the left side thickness and bookLeft as the right side thickness. ^^