| |
|
|
|
| Pageflip Flash Component Documentation |
 |
 |
|
|
| |
|
| |
Flash component documentation |
| |
|
| |
|
| |
Purchase and Installation |
| |
Once you purchase the component, the link to the download file will be sent to you by e-mail. This will be a zip archive with the component files, the documentation and a set of flip sounds. Download this archive to your computer, unzip it and run the flippingBook.mxp file. This will install the component on your computer. If you are not currently running the FLASH, close and restart it. The next time the environment is started the component will appear in the components panel and be ready to work. |
|
| |
|
| |
Starting the Work |
| |
To start working with the component simply drag its copy onto the Stage and specify page content. For high quality motion this effect usually requires high fps values. In our examples we used fps = 30 |
|
| |
Parameter Description |
| |
| Book Pages |
This parameter is a set of paths to the component page content sources. The order of pages is determined by the order the paths are specified. The paths can be library link IDs and paths to external swf and jpg files. If a path is incorrect, an empty page will be created.
Any book contains an even number of pages, therefore if you specify an odd number of pages, an empty page will be added in the end of the book. The pages are numbered beginning from 0.
|
| First Page Number |
Number of the page from which the book will be opened upon the start of playing the movie.
|
| Always Opened |
This parameter determines the appearance of the book. If its value is True, the book is always opened, if False, you may add the front and rear cover pages and make your book open and close.
|
| Autoflip Area Size |
This parameter determines the size of the area near the book edges for automatic flip starting upon bringing the mouse pointer to that area. To disable this effect, set this parameter to 0.
|
| Flip on Click |
This parameter determines whether flipping will be started by mouse clicking a page. If set to False, flipping will not start.
|
| Page Moving Speed |
This parameter sets the relative page moving speed during flipping. The higher its value the higher the speed and lower the page moving smoothness. The default value is 2.
|
| Page Closing Speed |
This parameter sets the relative page moving speed during closing.
|
| GotoPage Speed |
This parameter sets the relative page moving speed during the gotoPage(n) operation.
|
| Shadows Depth |
This parameter sets the shadows depth in pages. If set to 0, no shadows appear.
|
| Flip Sound |
This parameter is the path to the flip sound source file. Its value may be either an external mp3 file path or a movie clip library link ID. If the name is incorrect, the component will not work.
|
| Page Background Color |
This parameter determines the page background color. The color will be displayed when loading pages and used as color for empty pages. The color should be set in RGB in the following format: 0xNNNNNN, where N is a hexadecimal number (0-F).
|
| Load Pages on Demand |
This parameter controls page caching. If set to True, a page will be loaded only when the user browses all the previous ones. If set to False, all the pages will be loaded upon the start of the component.
|
| Cache Pages |
This parameter determines the page caching necessity. If set to True, all the pages will be saved in the component software cache and not reloaded on next demand. If set to False, pages will be reloaded on every demand. This allows creating books with dynamic pages. The default value is True.
|
| Use Preloader |
This parameter determines the necessity of using the preloader during page loading. If set to True, the preloader will be used, otherwise it will not be used. The preloader is only used for page loading. You may edit the preloader by customizing its appearance. To do this open the FB components\Premium Page Flip component\PagePreloader directory in the movie library, select the preloader symbol and edit it. Ensure that the scaled component has the name bar_mc.
|
| External XML Source |
This parameter sets the name of the external XML file with the component settings. If no name is specified, the development environment settings will be used. If the name is incorrect, the component will not work.
|
|
| |
XML file format |
| |
| To prepare your object for work you need setup configuration xml file. The component settings XML file is a usual text file of the following format:
<FlippingBook>
<width>200</width>
<height>100</height>
<firstPage>5</firstPage>
<alwaysOpened> true </alwaysOpened>
<autoFlip> 50 </autoFlip>
<flipOnClick> true </flipOnClick>
<shadowsDepth> 2 </shadowsDepth>
<moveSpeed> 5 </moveSpeed>
<closeSpeed> 3 </closeSpeed>
<gotoSpeed> 3 </gotoSpeed>
<flipSound> mp3/sound1.mp3 </flipSound>
<pageBack> 0xB4DBF5 </pageBack>
<loadOnDemand> true </loadOnDemand>
<cachePages> true </cachePages>
<usePreloader> true </usePreloader>
<pages>
<page> img/01.jpg </page>
<page> swf/my_movie.swf</page>
<page> swf/login_form.swf</page>
<page> Symbol1</page>
</pages>
</FlippingBook>
The embedded XML analyzer of the component is case and odd space insensitive, so be accurate but not afraid of making a mistake. As can be seen, all the file information is contained in the <FlippingBook></FlippingBook> structure. This is the core description unit – do not modify it. This unit contains component parameter units the names and values of which are the same as those of the component parameters in the development environment.
The Width and Height parameters allow controlling component size. The general parameter value format is as follows:
<parameter name>parameter value</parameter name>
The only exception is the set of pages by the <pages></pages> unit. This unit contains the list of pages in the following form: <page>page path</page>. The order of pages is determined by the order of page source paths. Remember that the source data can be not only external photo files, but also library symbols and external SWF files. |
|
| |
Component API |
| |
| Component methods |
- setSize(width, height)
Sets book size
example:
instanceName.setSize (200, 250);
instanceName is the name of component instance on the stage.
- gotoPage ( n )
Goes to page n.
You can use it only when book is not in flipping process.
example:
instanceName.gotoPage(12);
- flipForward()
Flips one page forward.
You can use it only when book is not in flipping process.
example:
instanceName.flipForward();
- flipBack()
Flips one page back.
You can use it only when book is not in flipping process.
example:
instanceName.flipBack();
- directGotoPage(n)
Goes to page n directly. Skipping unnecessary pages flipping. You can use it only when book is not in flipping process.
example:
instanceName.directGotoPage(12);
|
| Component properties |
- autoFlipProp
Get/Set Autoflip Area Size property
example:
instanceName.autoFlipProp = 50;
instanceName is the name of component instance on the stage.
- flipOnClickProp
Get/Set Flip on Click property
example:
instanceName.flipOnClickProp = true;
- moveSpeedProp
Get/Set
Page Moving Speed property
example:
instanceName.moveSpeedProp = 2;
- closeSpeedProp
Get/Set
Page Closing Speed property
example:
instanceName.closeSpeedProp = 3;
- gotoSpeedProp
Get/Set
GotoPage Speed property
example:
instanceName.gotoSpeedProp = 4;
- alwaysOpenedProp
Get/Set GotoPage Speed property. Read only.
example:
var tmp = instanceName.alwaysOpenedProp;
|
| Component events |
- onClick( i )
Appears only when the user mouse clicks on page i
example:
instanceName.onClick = function(i)
{
trace("Page clicked:" + i);
}
instanceName is the name of component instance on the stage.
- onPutPage( i )
Appears after flipping page i
example:
instanceName.onPutPage = function(i, page)
{
trace("Page number :" + i);
page.gotoAndPlay("anyFrame");
}
- onLastPage( )
Appears when end of book reached
example:
instanceName.onLastPage = function()
{
trace("End");
}
- onFirstPage( )
Appears when beginning of book reached
example:
instanceName.onFirstPage = function()
{
trace("Start");
}
- onStartFlip( i )
Appears when page i flipping starts
example:
instanceName.onStartFlip = function(i)
{
trace("Page #" + i + " is flipping");
}
- onFlipBack( i )
Appears when page i is returned back following the user releasing the mouse button
example:
instanceName.onFlipBack = function(i)
{
trace("Page #" + i + " is returned ");
}
- onEndGoto()
Appears when the gotoPage function is complete
example:
instanceName.onEndGoto = function(i)
{
trace("End of gotoPage procedure");
}
- onPageLoad( url )
Appears when page loading is complete
example:
instanceName.onPageLoad = function(url)
{
trace("Page: " + url + " loaded");
}
|
|
|
|
|
|