FlippingBook Flash SWF Object Documentation  
   
  Flash SWF Object documentation
 
   
    Purchase and Installation 
 

Once you purchase the Flash SWF Object, the link to the download file will be sent to you by e-mail. This will be a zip archive with the object files, the documentation and a set of flip sounds. Download this archive to your computer and unzip it.



   
    Starting the Work
 

To start working simply paste object HTML into your page and setup xml configuration file. You can place configuration file anywhere on your server.



    SWF Object HTML code
 

Paste this code into your HTML-page and replace object stage parameter with your values. (following HTML-code supports MS Internet Explorer and Netscape Navigator)

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/
flash/swflash.cab#version=6,0,29,0" width="width"
height="height">
 
<param name="movie" value="swf file path">
<param name="quality" value="high">
<param name="scale" value="noscale">
<param name="bgcolor" value="background color">
<param name="flashVars"
value="xmlConfig=path to configuration file">

  <embed src="swf file path" width="width" height="height"
flashvars="xmlConfig=path to configuration file" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer" type="
application/x-shockwave-flash" scale="noscale" bgcolor="
background color"></embed>
</object>
 



    Object stage parameter
 
Width

This parameter controls width of flash object stage on your HTML-page. The width of the object can be different. For good result size of the stage must be larger than size of the object. Width of the object you will setup in configuration xml file.


Height

This parameter controls height of flash object stage on your HTML-page. The height of the object can be different. For good result size of the stage must be larger than size of the object. Height of the object you will setup in configuration xml file.


Swf file path

This parameter points to the object swf file. You can store your swf files anywhere on server.


Background color

This parameter controls background color of object stage. So you can adjust its look and feel. The color should be set in RGB in the following format: #NNNNNN, where N is a hexadecimal number (0-F).


Path to the configuration file

This parameter points to the object xml configuration file. You can store your xml files anywhere on server. But remember this path can be absolute (example:
http://www.yourdomain.com/config/config01.xml) or relative to the directory with your HTML page (example: ../config/config.01.xml).




    XML file format
 

The component settings XML file is a usual text file of the following format:

<FlippingBook>
   <width>600</width>
   <height>400</height>
   <scaleContent>true</scaleContent>
   <firstPage>0</firstPage>
   <alwaysOpened> false </alwaysOpened>
   <autoFlip> 50 </autoFlip>
   <flipOnClick> true </flipOnClick>
   <staticShadowsDepth> 1 </staticShadowsDepth>
   <dynamicShadowsDepth> 2 </dynamicShadowsDepth>
   <moveSpeed> 2 </moveSpeed>
   <closeSpeed> 3 </closeSpeed>
   <flipSound>01.mp3</flipSound>
   <pageBack> 0x1C90CB </pageBack>
   <loadOnDemand> true </loadOnDemand>
   <cachePages> true </cachePages>
   <cacheSize> 10 </cacheSize>
   <preloaderType> Progress Bar </preloaderType>
   <pages>
      <page>images/photo01.jpg</page>
      <page>images/photo02.jpg</page>
      <page>images/photo03.jpg</page>
      <page>images/photo04.jpg</page>
      <page>images/photo05.jpg</page>
      <page>images/photo06.jpg</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 object size on the stage. 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 external SWF files.



    Object parameter
 
Pages

This parameter is a set of paths to the page content sources. The order of pages is determined by the order the paths are specified. The paths can be 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.


FirstPage

Number of the page from which the book will be opened upon the start of playing the movie.


AlwaysOpened
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
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.


MoveSpeed
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.


CloseSpeed
This parameter sets the relative page moving speed during closing.



ShadowsDepth
This parameter sets the shadows depth in pages. If set to 0, no shadows appear.


FlipSound
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 object will not work.


PageBack
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).


LoadOnDemand
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 object.


Cach Pages
This parameter determines the page caching necessity. If set to True, all the pages will be saved in the object 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.


UsePreloader
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.