The function did not work, Tracy, perhaps because I coded the tree in
flex using xml.  Do you have another approach?

-Sal


--- In [email protected], "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> Try:
> 
> if(productTree.selectedItem.label == "Folder 1")
> 
>  
> 
> Do you see why?
> 
>  
> 
> Tracy
> 
>  
> 
> ________________________________
> 
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of s_hernandez01
> Sent: Thursday, September 28, 2006 5:48 PM
> To: [email protected]
> Subject: [flexcoders] Tree Help Please
> 
>  
> 
> Would anyone know how to write actionscript telling Flex to call up an
> index in a ViewStack using a tree whose folders are coded in xml? 
> Here is something of what I want the code to say, but I can't get
> passed the errors. 
> 
> For example: 
> if(productTree.selectedItem == "Folder 1"){
> viewstack.selectedIndex=0;
> }
> else if(productTree.selectedItem == "Folder 2"){
> viewstack.selectedIndex=1;
> }
> 
> Below is how my tree is coded:
> 
> <mx:Tree id="productTree" labelField = "@label" width="100%"
> fontSize="10" fontWeight="bold" showRoot="false" 
> height="100%">
> <mx:dataProvider>
> <mx:XML format="e4x" xmlns="">
> <root>
> <folder label = "Folder 1" isBranch = "true">
> <folder label = "item 1"/>
> <folder label = "item2"/>
> </folder>
> <folder label = "Folder 2" isBranch = "true">
> <folder label = "item 1"/>
> <folder label = "itme 2"/>
> </folder>
> </mx:XML>
> </mx:dataProvider>
> </mx:Tree>
>







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to