0 Replies Latest reply on Apr 21, 2010 5:21 AM by FFBB

    Repeater with Line

    FFBB

      Hello,

       

      someone could help me to undestand where is the problem with this code?

       

      I would like draw some lines with the Y coordinate based on the Array = [60, 80, 100]

      Can I use the repeater to do that?

       

      <fx:Script>
                <![CDATA[
                
                [Bindable]
                private var lineYcoordinates:Array = [60, 80, 100];    
                
                ]]>
      </fx:Script>
           
           
           <mx:Canvas>
                <mx:Repeater id="rep" dataProvider="{this.lineYcoordinates}">
                     
                     <s:Group>
                          <s:Line xFrom="0" xTo="100" yFrom="{int(this.rep.currentItem)}" yTo="{int(this.rep.currentItem)}">
                               <s:stroke>
                                    <s:SolidColorStroke id="lineStroke" color="red" weight="2" />
                               </s:stroke>
                          </s:Line>
                     </s:Group>
                     
                </mx:Repeater>
           </mx:Canvas>
      

       

       

      thank you...