Advanced Flash Components
Search!
Search!
Home >  Tutorials >  Flow List (AS 3.0) >  Adding Content to Flowlist: XML...
Adding Content to Flowlist: XML document
Updated: Jan 4, 2008   Views: 1832  
Description: This tutorial will go through the steps on adding content using a XML document.


Complete XML script needed:

<?xml version="1.0" encoding="iso-8859-1"?>
<content>
    <image>
        <description><![CDATA[Adidas Ad]]></description>
<path><![CDATA[http://www.afcomponents.com/Vid/tutorials/Grid_as3/thumbs/adidas.jpg]]></path>
        <data><![CDATA[http://www.afcomponents.com/Vid/tutorials/Grid_as3/adidas-whatsinside-60.flv]]></data>
        <type>image</type>
    </image>
</content>


Creating the XML Document

To begin, create your xml file using Dreamweaver or a text editor, saving the file with a .xml extension. With a blank document open, create the content tag to start the document:

<content>


Now for each of the images that you wish to add you will define its URL path, a description of the item and extra data for the item such as URL link. The following is an example of an image. You will repeat this step for each item that you wish to load.

<image>
        <description><![CDATA[Adidas Ad]]></description>
                <path><![CDATA[http://www.afcomponents.com/Vid/tutorials/Grid_as3/thumbs/adidas.jpg]]></path>
        <data><![CDATA[http://www.afcomponents.com/Vid/tutorials/Grid_as3/adidas-whatsinside-60.flv]]></data>
</image>


When you have repeated the above for all items, close the content tag to finish the document:

</content>