This content has been marked as final. Show 4 replies
I do similar stuff with XML so I will describe my method but it will not necessarily be the only way to do this.
1. Use the XML class and load in your XML file will all of your information.
2. Setup a starting _y position variable
3. Create a loop to loop through each node of your xml file.
4. For each main node in your XML file attach the template from your library to the movieclip that will contain all of your pieces.
5. Perform all of the necessary steps to populate your banner.
6. Position your new banner movieclip on the stage using your starting _y position.
7. Update the starting _y position by adding to it the _height of your current banner ( you may also want to add a few more pixels to it for spacing.
8. continue with the next node in the loop.
Is this enouh to get you started or do you need a more complete example?
Boom, nice answer.
Yeah this explains to me perfectly what to do, thanks for that!!!
I however don't know how to set this loop up, I'm sure I can bug some people about it and get an answer off them, at least I know where to start now. I guess it makes sense, I can't believe I didn't think about it.
If you have any more info for me on how to setup the looping action, could you email me:
*My Email Address
I could send you my file to check out then, an old school as scripter friend of mine can help, but he used to get xml in the old way, not using the xml connector component...
I still haven't figured this out yet, Can anyone help me out a bit more thuroughly??
Are you using the Component Inspector to bind the resutls from the XMLConnector to the other components? If you are, then I do not know how to loop through the XML and keep those bindings. But...if you don't mind storing the results from the XMLConnector into an XML variable and then using the XML and XMLNode class methods, I can help you with that.
You can e-mail me directly at: Tim Symons