8 Replies Latest reply on Mar 11, 2011 1:53 PM by Flex harUI

    how to create and change a itemRenderer with AS3

    Maximist Level 1

      Hallo. Actually i have this code:

       

      <s:List id="myList" width="92%" height="85%" left="44" top="80" skinClass="skins.mioList_skin">

       

       

           <s:layout>

                <s:VerticalLayout gap="5"/>

           </s:layout>

       

       

           <s:itemRenderer>

                <fx:Component>

                     <ns2:myItemRenderer />

                </fx:Component>

           </s:itemRenderer>

       

       

      </s:List>

       

      This code works perfectly. This code is mxml code. I wish to create exactly the same structure but with as3 code cause i have the necessity to change (as the component is created) the itemRenderer. Specifically i have a variable named listType which can have 3 different values and for each value i have a different itemRenderer. How can i do it with or without as3?

       

      Thx for all

       

      Max