PDA

View Full Version : dynamic catalog xml/flash


wiley173
05-18-2004, 12:43 AM
Just curious if anyone has done something like this here. I would just like to know how to dynamiclly load .swf movies into a flash from an xml file and line them up in a certain postion.

function processCatalogTEST(xmlDoc_xml) {
num = 50;

for (var n = 0; n<xmlDoc_xml.firstChild.childNodes.length; n++) {
if (xmlDoc_xml.firstChild.childNodes[n].nodeName=="sp_products") {
num+50;
//this is the code I'm testing to create the movie clips
_root.createEmptyMovieClip(target + n ,1)._x=num;
loadMovie("http://localhost/flashTest/products/p" + n + ".swf", target + n);
//-------------------------------------------------------------------------

} else {
trace(xmlDoc_xml.firstChild.childNodes[n].firstChild.nodeValue);
}
}

If this happens to make any sense to someone out there what I'm trying to do please help me out.

-Wiley

issamneo
05-18-2004, 06:04 AM
hi you connect to your xml file
then in the load
you make a for loop
in each iteration you create an emptymoviecilp whish you will load in it a mc
and for the x and y you can read them from xml or you create a function that will place them
for more help i'm ready