Component Tutorials  
   
  Flash component tutorials:
 
   
  Flash object tutorials:
 
   
   
    Creation of a Photo Catalog Using XML
 
In this Lesson we will create a movie clip using the page flip component identical to the one described in the first Lesson. The only difference will be that the component will receive its setting parameters not from the development environment component parameters but from an external XML file.

Step #1
Open the FLA file created in Lesson No. 1 and save it as lesson02.fla. Select the copy of the component on the Stage to get access to its properties. Browse the parameters list to the bottom and enter my.xml for the External XML parameter. Do not start playing your movie – we haven't yet created the configuration xml file:




Step #2
To create it, use any text editor like notepad, create a text file with the following content:

<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> </flipSound>
    <pageBack> 0xB4DBF5 </pageBack>

    <loadOnDemand> true </loadOnDemand>
    <cachePages> true </cachePages>
    <usePreloader> true </usePreloader>

    <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>
        <page> images/photo07.jpg </page>
        <page> images/photo08.jpg </page>
        <page> images/photo09.jpg </page>
        <page> images/photo10.jpg </page>
    </pages>

</FlippingBook>

and then save it to the earlier created FBookLesson directory as my.xml. (Be careful: text editors often add the .txt extension to the files they have been used to create. All the XML file parameters correspond to the component parameters. Their description and additional information are available in the Documentation Section. Make sure the target file has exactly the name my.xml. The component is not sensitive to file extension, but the file name should be the same as the value of the External XML Source parameter.


Step #3

Now go back to the development environment and start playing the movie. Done!