hey all, I can’t get my flash movie to display the XML data…
function GenerateProducts (products_xml){
var productpix = products_xml.firstChild.childNodes;
for (var i=0; productpix.length; i++) {
var currentproduct = productpix*;
var currentThumb_mc = menu_mc.createEmptyMovieClip("thumbnail_mc"+i, i);
currentThumb_mc._x = i * thumb_spacing;
}
}
//create XML data in doc and specify location
var products_xml = new XML();
products_xml.ignoreWhite = false;
products_xml.onLoad = function (success){
called "Success"
if (success){ GenerateProducts(this);
//trace(this);
} //if onLoad works, execute function "GenerateProducts"
else trace ("error loading XML file, sucka!");}
products_xml.load("products.xml");
/////////////////////////////////////
//var currentProduct = productpix*;
desc_txt.text = currentProduct.attributes.stitle;
trace (productpix);
XML:
<images>
<section stitle="Deer Resistance YO">
<pic>
<category>Deer Resistant Gardens</category>
<image>images/1_1.jpg</image>
<caption>Information goes here</caption>
<thumbnail>images/thumbs/1_1.jpg</thumbnail>
</pic>
</section>
</images>
I can’t get the trace to work on “productpix”… I get “undefined”