sorry...i didnt explained the whole thing.. the thing is that flash duplicates one button mc with all the elements from the xml...and makes a loop. Every button have a different link for a different pictures...
But the first one works good..(newBut.link = mainMenus[i].firstChild .firstChild.nodeValue): <root> <pic> >>>>>>>> this one works.. <image>http://www.kirupa.com/developer/mx2004/pg/kresge.jpg </image> <imagep> http://www.kirupa.com/developer/mx2004/pg/medialab.jpg </imagep> </pic> </root> now the second..when i try to use this : newBut.link2= mainMenus[i].firstChild.firstChild.firstChild.nodeValue; to catch this: <root> <pic> <image> http://www.kirupa.com/developer/mx2004/pg/kresge.jpg </image> <imagep> http://www.kirupa.com/developer/mx2004/pg/medialab.jpg </imagep> </pic> </root> On 7/24/06, Mike Boutin <[EMAIL PROTECTED]> wrote:
My not use childNodes? mainMenu.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue; mainMenu.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue; Jose Maria Barros wrote: > Hi, > > i have the xml: > > <root> > <pic> > <image>http://www.kirupa.com/developer/mx2004/pg/kresge.jpg</image> > <imagep>http://www.kirupa.com/developer/mx2004/pg/medialab.jpg > </imagep> > </pic> > </root> > > in flash, the variable "link" that holded the "image" node: > > newBut.link = mainMenus[i].firstChild.firstChild.nodeValue; > > worked..welll... > > > now i want to have other variable..that holds the "imagep" > node..normally it > would write: > > newBut.link2= mainMenus[i].firstChild.firstChild.firstChild.nodeValue; > > > But it says is undefined...hows that ? > > Thanks.. > _______________________________________________ > [email protected] > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > > > _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
_______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

