Getting Started


So, you've got this collection of images. What kind of information about them would be useful in your project? At the bare minimum, you need to know the image's filename so that you can tell Flash from where to load the image. Another useful bit of information is the image's title. You might also want to add more and more information about the image, such as the photographer's name and a description of the image.

If you're using only the title and URL (filename and path) of each image, a simple XML data structure such as the following would work well:

<images>     <image title="Slide 1" url="images/slide01.jpg" />     <image title="Slide 2" url="images/slide02.jpg" /> </images>


In this case, you're using the XML node attributes to format the information that is unique to each image. This format is easy to use with ActionScript.

Note

One misconception I've encountered as people start working with XML and media is that the photos are stored in the XML document itself. This is not true. All that actually is stored by the XML document is the file path to the photos used in the slide show. The photos themselves reside in individual files on the server.




Special Edition Using Macromedia Studio 8
Special Edition Using Macromedia Studio 8
ISBN: 0789733854
EAN: 2147483647
Year: 2003
Pages: 337

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net