The story so far: I’m attempting to build an XML-driven portfolio for my website. I’ve thought about the logic behind the XML and the functions, but i’m relatively inexperienced with XML in Flash, so i’m seeking advice from the generous Kirupa population regarding how to go about this. Any input is welcome and appreciated.
The concept: (Hope this makes sense–haven’t slept in over a day). The main website .swf will load an external .swf that holds three movie clips, each a blank panel to hold the portfolio pieces, as well as ‘previous’ and ‘next’ buttons to move through the portfolio. Each portfolio entry will consist of two images, a blurb of text, and a button to launch the website/piece that the portfolio entry is displaying. I’d like to have the two images, the text and the path to the website/piece, for each entry, located in an XML file.
Methodology: A root node contains one child node for each portfolio entry. Each child node has three attributes, the path to the first image, path to the second image, and URL to the website/piece on display. In addition, each child node has it’s own child node that contains the text blurb for that particular portfolio entry.
From here, i know i need to write functions to read the XMl data and fill empty movie clips/text fields with the data, as well as load the “Launch” button with a URL. For the most part, i can handle those. My problem comes with scripting the ‘previous’ and ‘next’ buttons to load the next three entries in the portfolio. My guess is some sort of counter that increments and is sent into the function that fills the empty movie clips/text fields. I’m conflicted as to whether i should fill arrays with the data from the xml file, and fill the clips from there, or simply use the built-in xml methods to navigate through the data in the XML file, filling the clips directly from the xml. And in either case, i think i’m coming up just short of knowing how to do it, especially now, considering my lack of sleep.
So there you have it. Again, any advice/code/fla files/coffee would be more appreciated than i can express.
-jay