|
|
||||||
| Ultrashock Tutorials > Flash 8 > XML Portfolio Viewer | ||||||
|
||||||
|
|
XML Portfolio Viewer |
|
||||
Portfolio XMLThe portfolio.xml file contains a description of all portfolio data. Individual portfolio items are associated with a single thumbnail image and are described inside <image> tags, such as <image id="0"> So, why did I not use an <item> tag? That's a good question. In the very first implementation of the portfolio viewer, there were only three items associated with a thumbnail image; a title, url of the thumbnail, and url of the portfolio sample. For some reason, an <image> tag made sense at the time. It has not been changed since the first version of this application. There was a time when I used the 'id' attribute in the <image> tag. That is no longer the case, however, I left it in the file (and the parser) in case your application needs to associate a unique ID with each portfolio item. Tags Following is a description of each tag and how its data is used in the application. url - URL of the portfolio item. This url is opened in a new browser window whenever the user clicks on the PLAY button. thumb - URL of the thumbnail image, relative to the location of the application .SWF file. This url is used by the thumbnailer to load .jpg thumbnail images title - Title of the portfolio item. This title is displayed in the STATUS component whenever the viewer rolls over a thumbnail image. width - Width of the item in pixels. Width is displayed in the SYNOPSIS component after the viewer clicks on a thumbnail image. height - Height of the item in pixels. Height is displayed in the SYNOPSIS component after the viewer clicks on a thumbnail image. size - File size of the portfolio item in MB, if applicable. Size is displayed in the SYNOPSIS component after the viewer clicks on a thumbnail image. time - Run time of the portfolio item, if applicable. Time is displayed in the SYNOPSIS component after the viewer clicks on a thumbnail image. synopsis - A brief synopsis of the portfolio item. This information is also displayed in the SYNOPSIS component. This gives the viewer detailed information on the portfolio item. It is frustrating to see a collection of small thumbnail images, then load the corresponding image or animation only to find out that you did not want to view that item in the first place. By displaying summary information first, including file size and run time, the user can decide to display the portfolio item by clicking on the PLAY button. Now that the application and its data have been summarized, it's time to think about application architecture. |
||||||
©2006 Ultrashock.com - All rights reserved |