• Book Creation Process

Book Creation Process

Book creation is performed in several steps:

  • Preparing book pages
  • Copying files
  • Configuring book parameters
  • Publishing

Let's consider all these steps.

Preparing Book Pages

You can use image (JPEG, PNG, GIF) and SWF files as book contents. That’s why at the first step you need to create these files. If your pages are images, just copy them to a separate directory. If you need to create a flash-book from PDF document, save your PDF page by page in JPEG format (you can use Photoshop or Acrobat Pro) or convert it to SWF files using swftoos.

The book size is set in pixels and is equal to two book pages. For example, if the size of your book should be 800×600 pixels, then the page size would be 400×600 pixels. For the work you should create a separate directory on your computer where all book files will be stored. It can be created in any place (even on the desktop) and have any name. Not to lose it, call it FlippingBookExample. Save your page files to the pages/ directory inside the FlippingBookExample directory.

If you are going to use the zooming function, you should create the enlarged versions for every page. The enlarged pages can be of any size. You should choose it by your own, so that the text is readable. For the kitchen_gorenje_2008 catalog we used pages of 992×1403 pixels. Save the enlarged pages into the FlippingBookExample/pages/large directory. Your pages are ready and you can start configuring HTML pages.

Copying Files

To be able to work with the book, you should copy some files from the product package. Copy the following files and folders to the FlippingBookExample directory:

FlippingBook.swf file. It contains the flash application of the book.

Js/ folder. This folder contains JavaScript files necessary for work.

css folder/. This folder contains css styles necessary for work.

img folder/. This folder contains button and application background images.

index.html file This is an example of the liquid template for the book. You can use it for the work or create your own HTML template for the book by analogy. In the current documentation we will consider an example of book creation on the basis of the existing index.html file. All the necessary files are copied and ready for work. You only have to configure the book.

Configuring Book Interface

All the book settings are specified inside the bookSettings.js file. In total a book has more than 60 different parameters but you don' have to use them all. Every parameter has the default value specified in the flippingBook.js file and if this value suits you, you don' need to configure it in the bookSettings.js file. For example, the default value of the hardcover parameter is false (switched off). If it suits you, you don' need to do anything. If you want to turn the hardcover on, add the following string to the bookSettings.js file:

flippingBook.settings.hardcover = true;

All the parameters are configured in the following way:

flippingBook.settings.parameterName = parameterValue;

Here are the settings of our example (bookSettings.js file)

Configuring Pages

To configure pages, specify the path to the page files in the bookSettings.js file. For example,

flippingBook.pages = [
   "pages/page-001.jpeg",
   "pages/page-002.jpeg",
];

You can use either relative (folderName/fileName) or absolute paths: http://www.site.com/some-folder/some-file.jpg

Configuring Table Of Contents

To configure contents, specify chapter name and page number, at which this chapter starts:

flippingBook.contents = [
  [ "Cover", 1 ],
  [ "Modern", 4 ],
  [ "Familiar", 34 ],
  [ "Classic", 58 ]
];

In this example the «Modern» chapter starts with page 4 and ends at page 34. The detailed description of all parameters can be found in the next section. Your book is ready. You can open the index.html file in the browser window.

Publishing

To publish your book on the site, just upload all the files from the FlippingBookExample folder on your server.

Was this article helpful?