Hi, as you know every book has a unique ID - so called ISBN number with 10 digits. You can find this ID on every back side of a book. If I want to see a flash animation for book 1234567890 then the Flash file is loading the images from this book and includes the images in the animation. If I want to see another book, then the flash file is loading the images from another book.
All pages of a book are saved in a folder: structure like this:
Books:
- Book 1234567890
--image 1
--image 2
--image 3
-- ...
- Book 2345678901
--image 1
--image 2
--image 3
-- ...
I have to make a PHP program that can generate Flash files dynamically. Example: I open PHP script with ID of book 1234567890
example: flashbuilder.php?ISBN=123456890
then PHP script opens Flash animation and includes automatically images from folder 1234567890. Then I can open the book and turn pages in this book like above in task1. When I open book with this link flashbuilder.php?ISBN=123456890 then front cover is opened and when I open book then inside pages are loaded.
Very important: book pages are saved on other server. Script has to load pages via Internet. This means: script cannot download whole 400 pages for this book. My idea (maybe there is better solution): script loads always 2 pages in "cache". When I turn page forward then already 2 pages in cache loaded and animation can work very fast - no waiting for downloading pages from server.
Also I have to include function to open page in middle of book:
example: flashbuilder.php?ISBN=123456890&page=220
When I open book with this link then script loades automatically page 220 on the right and page 219 on the left (because always shown 2 pages: even number is right, odd number is left on screen). In cache is loaded automatically page 217 and 218 and page 221 and 222 (when I touch page 219 then I go back to last pages without waiting for loading images from server because already in cache, when I touch page 220 then loaded page 221 and 222 from cache very fast.)
"page" - this will be document-ID - in the future all files have this ID as name
If someone has any ideas please help me. Here is the flash book I made: http://iliyanedelchev.hit.bg/
Thank you!