PDA

View Full Version : loading 3 xmls deping on user clicks the button,...plz help



sundeep_02tv26
02-13-2007, 06:10 AM
hai to all help me plzzzz

i did photogallery for my project.it is driven by the xml.

the pics are classifed as small,medium,large.

i kept three buttons like small_mc,medium_mc,large_mc.

if the user clicks on them the respective xml should load and corresponding pics should be loaded.

here i did like
on(press){
l="small.xml";
}
on(press){
l="medium.xml";
}

this is where xml will be loaded in flash mx 2004.

my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.load(l);---------this is not working i am not geting the pics loaded
any corrections plzzzzzzzz
my_xml.onLoad = function() {
rootElement = my_xml.firstChild;
children = rootElement.firstChild.childNodes;
bababbabbababbabbaba

clark kent
02-13-2007, 01:32 PM
try to put a trace where the XML loads.

What is "l" ?

greets
Clark

BLiZZaRD
02-13-2007, 07:20 PM
It's not working because on button press you are just changing a variable. You are not rerunning the load function.

The easiest way is to make 3 instances for the XMP load function. Give them each a different load (not "l" but "small" "med" "large" etc.)

Add that to your button's on(press) and on (release) call that function.

I know you have a working model of the XML load function, we made your last one work not too long ago ;)