2 Replies Latest reply on Jul 2, 2009 1:13 PM by jcrivera07

    How to set selectedChild/Index of TileList ViewStack item

    jcrivera07 Level 1

      '

      Hello, I currently have a TileList that has 6 items. I am currently rendering each item as a ViewStack (as shown below), but when I try to set the selectedIndex attribute of the object, it doesnt work...the content1 content shows up for each item instead of object w/ id = N showing content N. Any ideas how I can get this to work?

       

      <mx:TileList >
                  <mx:itemRenderer>
                      <mx:Component>
                          <mx:ViewStack>
                              <mx:HBox  id="content"1>
                                    <mx:Label text="card 1  Content" />
                              </mx:HBox>

       

                              <mx:HBox id="content2">

                                      <mx:Label text="card 2 Content" />

                               </mx:HBox>

                                 ...

                                 ...

                                 <mx:HBox id="content6">

                                      <mx:Label text="card 6 Content" />

                               </mx:HBox>


                          </mx:ViewStack>
                      </mx:Component>
                  </mx:itemRenderer>
         
                  <mx:Object id="obj1" selectedIndex="0"/>
                  <mx:Object id="obj2" selectedIndex="1"/>

                              ...

                              ...
                  <mx:Object id="obj6" selectedIndex="5"  />
              </mx:TileList>