This page contains information about how to set up the PageFlip, how to create the content, and customizing. All the XML properties are detailed. Please read it carefully before setting up a new book. If something is not covered by this documentation, please let us know.
Download the sample XML file. (IE/FF: Right click > save link as - Safari: alt click)
First set the PageWidth/PageHeight (in pixels) in the XML file, then make your page files using the same dimensions. Save them in jpg/gif/png or swf format. Set the filenames in XML to each page.
You are ready to start PageFlip.
To meet all the features and possibilities with PageFlip, read the detailed description below.
PageFlip is an application that simulates a book on your screen, let you flip pages by dragging them, or by using control buttons. Usually it is used online, embedded into any website, to present book-like content.
As PageFlip is an Adobe Flash application, it have all the advantages of a Flash document, every page content can be not only a graphic symbol (picture, static vector based shapes) but an animation (frame by frame, or scripted) or interactive flash content (forms, sound/videoplayer, any flash application).
In addition PageFlip have many features that can help browsing and building content.
Before building a PageFlip, it is important to know what features would you like to use. The size of the pages, its format, the need of the thumbnail or zoom files, all depends on what you set up in XML.
PageFlip is composed of page files. They could be jpg, gif (non animated), png or swf files. Image files are for static content, the best performance of the flip animation speed is achieved by using image files. (You can make transparent page not only by swf, but by using png format, and still keep the advantage of using an image file)
Swf files are treated specially, because they are special. They are scalable, they can be animated and scripted.
It is recommended to add the following script to each page's root:
function reset(onTop, active) {
//custom script here
}
Custom scripts have to control
The variable onTop
is true only when the page is on the top of all other. Buttons have to be enabled only in this case.
active
is true, when the page is visible, but not on top (when the top page is transparent, or in thumbnail mode). It have to control animation on the page.
If you want to use the same swf file for the normal page view, and for the zoom view too, or you would like to use AutoSize feature, then you have to define some variables on the same level as the previous script:
// used for autosize;
pageWidth = 330;
pageHeight = 380;
// if used as zoom file, use these size parameters
zoomWidth = 660;
zoomHeight = 760;
zoomScale = 200;
The values for AutoSize tells the script how big is the loaded page's original size. Values for zoom tells the PageFlip how many it have to enlarge the content.
LiveThumbnails
is set to "true"
in the XML file, you don't need to make thumbnail files, as they are scaled down from the page file.
Any other case, the thumbnail files have to be the scaled down copy of the original page content.Enable Transparency in the XML file (Transparency="true"), to be able to use transparent content. This enables a one level page transparency, that means you can view through the page, you can view the page overlaid, but not the next. Only 1 layer is rendered in addition. This is for best performance, too much page content rendering can slow down the flow of the flip control.
If you don't want to use transparent pages, set this attribute to false (Transparency="false"). Rendering will be smoother this way.
Pages can be rendered like "hard" book covers. 3 attributes controls this option:
Hardcover
(Settings' attribute)
"false"
to use "soft" cover (default value)."true"
to render "hard" book cover.Hardpage
(Settings' attribute)
"false"
to use "soft" pages (default value)."true"
to render inside pages as "hard" page.HardPage
(PageOrder/PageData's attribute)
"true"
to render that page as "hard" page (default false).As all hard-covered book's cover larger than the inside pages, PageFlip let you the option to use Larger cover pages. This feature works correctly only if you enabled Hardcover.
The following attributes are for setting up PageFlip's "Large"cover:
LargeCover
(Settings' attribute)
LargeCover="true"
, default false).LargeCoverTopOversize
(Settings' attribute)
LargeCoverSideOversize
(Settings' attribute)
Pages can be scaled up/down as the stage is resized. The zoom-page viewer area and the Thumbnails area are also scaled if this option is enabled (PageScale="true", default false).
The scaling is done by the following way:
PageFlip is rendered at 100% (with the page size set in the XML) only when it is displayed with same Stage size (at embed level in html, or in Flash Player) as it is defined in pageflip_loader.fla's BaseStageWidth
and BaseStageHeight
variables. When the stage is resized, PageFlip fits itself inside the space left. Space left means, the Stage.height - DefaultControlHeight
. DefaultControlHeight
is set in pageflip_loader.fla, and it is the Height of the bottom control-bar in pixels.
Thumbnails are displayed only if ThumbnailsEnabled
(Settings' attribute) is set to true (ThumbnailsEnabled="true"
)
LiveThumbnails
means, that the thumbnail images of the pages are the pages itself, just resized. All pages are shown exactly as they appears in the book. With ThumbnailsActivePages
enabled (ThumbnailsActivePages="true"
, default false) animation are rendered too. LiveThumbnails
are rendered on stage so they fit the book's area, like they are sit on a spread. If PageScale
is enabled, the thumbnails will be scaled too.
Disable LiveThumbnails
(LiveThumbnails="false"
, default true) to allow pageflip to load pre-saved thumbnail pages. They will be displayed with predefined fixed size, and they won't be never scaled. If ThumbnailScale
is enabled (ThumbnailScale="true"
default false) the thumbnail area will be scaled, and the images will be rearranged to fit inside.
The size of the loaded thumbnail images must be set (only if LiveThumbnails
is enabled) in ThumbnailWidth
/ThumbnailHeight
(Settings' attribute).
ThumbnailPadding
(Settings' attribute)
ThumbnailBorderWidth
(Settings' attribute)
ThumbnailBorderColor
(Settings' attribute)
"0x333333"
, Hexadecimal RGB value).ThumbnailBorderHoverColor
(Settings' attribute)
PageFlip have built in pageflip sounds, that can be controlled from XML. You can enable/disable PageFlip sounds (Sounds Enabled="true"/"false", default false), you can set up the flipping sound level from 0-100 (EffectVolume="100", default 25), and you can set custom mp3 files for 3 event: Start flip, End flip (sounds when mouse is released) and for TearOff.
The size of your page depends on the usage of the book:
AutoSize
to "true"
in the XML file, the page will be resized to the predefined size.It is important, that if you already know the page size, you have to set the BaseStageWidth
and BaseStageHeight
values in pageflip_loader.fla so the pages will have enough space to fit on the Stage. You have also set the Stage size too (or in the html embed script).
BaseStageWidth
/BaseStageHeight
is used to calculate the scaling factor of the book. These variables and the Stage size must be large enough to display the book and the controls on the Stage without cropping.
Example:
If you want to use 400x600 sized pages, your book will be 800x600, add then the controlbar height -> 800x660, and add some space at the top and bottom of the book -> 800x800
Set your Stage size to 800x800 pixels (if you enabled page scaling in XML, this step can be skipped)
Set these variables:var BaseStageWidth = 800;
var BaseStageHeight = 800;
Now your pages will be displayed as espected.
Page files must be made using the dimensions set in XML (PageWidth
/PageHeight
Settings' attribute), except if you enable AutoSize
option in XML (AutoSize
Settings' attribute, default true).
Buttons on the page
Making buttons needs a bit more attention than non-clickable objects. If transparency is enabled/used, a page can still visible even if it isn't on top. if there are buttons on the page, they will be clickable through the transperent page, and trigger the page below. In addition, if ZoomOnPageClick
feature is enabled (ZoomOnPageClick="true"
, default false), zooming must be disabled if a button is hovered. To fix these issues, a short script must be added to the page's root to control buttons:
function reset(onTop,active) {
button1.enabled = onTop;
button2.enabled = onTop;
//etc.
}
//for each buttons:
//needed only if ZoomOnPageClick feature is enabled
button1.onRollOver = function () {
pfroot.overbutton = true;
}
button1.onRollOut = button1.onDragOut = function () {
pfroot.overbutton = false;
}
button1.onRelease = function () {
pfroot.overbutton = false;
}
//etc.
Please note, that if you have already defined a reset function, just add the script enclosed by the braces to the existing reset function.
Animation on the page
Animations are also controlled by the reset function. If a page is not visible, the animation on it must be stopped.
DragZoom="true"
, default false) or by mouse movement over the page. The size of the area where zoom pages are loaded can be changed also (if PageScale is enablet it will be scaled like the book), that is important if you change the Stage size.
LiveThumbnails
option is disabled, each page must have an associated thumbnail file, they will be loaded when the thumbnail button is pressed first. They are fixed sized. If PageScale
is enabled, the thumbnail won't re-scaled, but they will be rearranged to fit the available space on the stage.
Location of the customisable items: pageflip_loader.fla -> library -> Customisable items
Symbols name ending with _btn are the button MovieClips, each with (except autoflip) 3 frames -> normal/hovered/pressed.
ctrl is the layout MovieClip. Make attention of the script in that MovieClip, it controls the functionality of the buttons. If you change the buttons, its MovieClip must have the same instance name as it has originally.
If the pages are not correctly fit on the stage, you have to set BaseStageWidth
and BaseStageHeight
variables in the _root of pageflip_loader.fla. The control-bar and the pages will be placed automatically.
Copy and paste the Pageflip Loader MovieClip from the pageflip_loader.fla's library to your own Movie (in this case, page scaling won't work correctly).
The Dynamic PageFlip 3.5 uses an XML configuration file to store preferences and content information. This XML file can be edited with a text editor (not word processor!) like TextEdit/TextWrangler/NotePad or can be generated by a server-side script.
The XML filename can be set in Pageflip Loader MovieClip in the library of pageflip_loader.fla.
Save PageFlip files (XML file included) into the same folder as the pageflip_loader.swf, or in a sub-folder of that folder
the first part of the XML configuration file, used to configure the book.
Controls the zoom environment's window size, mouse follow speed. If ZoomActivePage is "true", animations on the zoomed page will be active.
ZoomOnPageClick means that a simple click on the page switch to zoom view
If DragZoom is "true" the zoomed page can moved by dragging it.
PageFlip sounds are controlled by the following attributes:
the second part of the XML configuration file. Pages are defined in this section. Each page is defined in a pagedata
tag, and have the following attributes:
this part is optional, it can build you a table of content, that can be accessed from any page of the book. Each TOC item is defined in a Link
tag, and have the following attributes:
this part is optional, it can change all text displayed by PageFlip:
PagerText="Page #"
, but if set to "#. oldal"
then it will display "22-23. oldal"If you still need help on PageFlip set up, or you think this page is not informative enough, please contact us.