6 Replies Latest reply on Aug 26, 2009 1:19 AM by Madhav Subedi

    The currentIndex property of Repeater

    mooraway

      I use Flexlib VAccordion.

       

      Here is the XML file:

      <?xml version="1.0" encoding="utf-8"?>
      <a_nav>
      
      <heading title="Header 1" width="230" height="120">
      <link linkname="Sub 1" url="../swf/moora1.swf"></link>
      <link linkname="Sub 2" url="../swf/moora2.swf"></link>
      <link linkname="Sub 3" url="../swf/moora3.swf"></link>
      </heading>
      
      <heading title="Header 2" width="230" height="220">
      <link linkname="Sub 1" url="../swf/moora4.swf"></link>
      <link linkname="Sub 2" url="../swf/moora5.swf"></link>
      <link linkname="Sub 3" url="../swf/moora1.swf"></link>
      </heading>
      
      <mx:HTTPService id="srv" url="properties.xml" resultFormat="e4x" />
                
      <mx:XMLListCollection id="headingData" source="{srv.lastResult.heading}" />
      <mx:XMLListCollection id="linksData" source="{srv.lastResult.heading.link.@linkname}" />
      <mx:XMLListCollection id="swfData" source="{srv.lastResult.heading.link.@url}"/>
      
      <flexlib:VAccordion id="accordion" headerRenderer="Header" width="238" height="230" >
                     
           <mx:Repeater id="rep" dataProvider="{headingData}">
                <mx:VBox label="{rep.currentItem.@title}" styleName="headerBox"  backgroundColor="#fafafa" width="{rep.currentItem.@width}" height="{rep.currentItem.@height}">
      
                <mx:Repeater id="linkrep" dataProvider="{rep.currentItem.link}">
                <mx:LinkButton  buttonDown="swf_loader.unloadAndStop(); swf_loader.load(swfData.getItemAt(linkrep.currentIndex));"  label="{linksData.getItemAt(index+=1)}" />
                </mx:Repeater>
      
           </mx:VBox>
           </mx:Repeater>
                               
      </flexlib:VAccordion>
      

      The currentIndex property of linkrep Repeater is not working.

      I want when the user click on the LinkButton, it loads its SWF.

       

      Please, help me.