3 Replies Latest reply on Jan 11, 2010 5:24 AM by jdesko

    Rendering images from a database using spark list control...

    hinesjameso

      I'm fairly new to Flex, having decided to make a real effort to learn the framework after an earlier attempt. It seems my timing could not have been worse with there being the transition from Flex SDK 3 to 4 and form Flex Builder to Flash Builder, but I've decided to change with the times and get a leg up on Flash Builder and the Spark based approach to building a UI.

       

      I'm able to render a list of images from a database using this code and the Halo List Control:

       

      <mx:TileList x="140" y="10" id="tileList" borderVisible="false" creationComplete="list_creationCompleteHandler(event)" dataProvider="{getAllImagesResult.lastResult}" labelField="filename">
              <mx:itemRenderer>
                  <fx:Component>
                      <mx:Image height="100" width="100" />
                  </fx:Component>
              </mx:itemRenderer>
          </mx:TileList>

       

      But not this code with the Spark List Control:

      <s:List id="list" borderVisible="false" creationComplete="list_creationCompleteHandler(event)" dataProvider="{getAllImagesResult.lastResult}" labelField="filename" x="20" y="10">
              <s:itemRenderer>
                  <fx:Component>
                      <mx:Image height="100" width="100" />
                  </fx:Component>
              </s:itemRenderer>
          </s:List>

       

      The code hinting in Flash Builder suggests using the Spark based controls instead of the old Halo version. What am I missing?