Mike, take the XMLList that you have and run a for each loop on it looking for a match at the name attribute
for each (var element:XML in FloorPlanData.floor){ if(eleme...@name == thisLabel){ return element } } or something along those lines Hope this is what you were asking greg On Thu, Apr 30, 2009 at 3:23 PM, Mendelsohn, Michael < michael.mendels...@fmglobal.com> wrote: > Thanks for replying, Cor. Yes, when the xml is loaded, the Event.COMPLETE > function gets fired. That part isn't the problem because I'm already doing > other things with the XML. It's just this bit that I can't get an XMLList > for. > > What really happens is Sprites within a ScrollPane component get a > MouseEvent.MOUSE_UP event, and these sprites contain a TextField that has a > string. > Here's the real function below. The string gets passed no problem. I just > can't get an XMLList built. > > Thanks! > - Michael M. > > private function onClick(m:MouseEvent):void{ > // no problem here > var thisLabel:String = TextField(m.target["getChildAt"](1)).text; > // should I build an XMLList containing everything first? > // no problem here either > trace(FloorplanData..floor); > // traces nothing > trace(FloorplanData..*.((hasOwnProperty("name")) && > (attribute("name")==thisLabel))); > } > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders