I think what you are looking for is.
function labelThingy(node:Object):void
{
trace("my name is " + node.name());
trace("my id is " + [EMAIL PROTECTED]);
}
Peace, Mike
On 9/13/06, Clare Todd <[EMAIL PROTECTED]> wrote:
I have a tree that has some XML returned from an HTTP service as its dataprovider The XML structure is essentially:<things><redthing id="1" name="Todd"/><bluething id="23" happy="yes"/><orangething green="no"/></things>I'd like my labelFunction to be able to react to the different types of things. In english it would do this:Hey, I have an item!Is this item a "redthing"? If so, return this as the String from labelFunction.If not, is it a "bluething"? ...You get the point.Is there a way (I'm new to XML, e4x, etc.) to get the xml... node... name? (not sure if these are the correct terms) or somehow discover what kind of node I'm looking at?Thanks!-- TC
--
What goes up, does come down. __._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Software development tool Software development Software development services Home design software Software development company
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
Reply via email to