4 Replies Latest reply on Jul 13, 2009 4:59 AM by jimmyoneshot

    Setting the border styles of images within a tilelist

    jimmyoneshot Level 1

      I was wondering how is it possible to set the border styles (colour, thickness etc) of the images produced within a tilelist populated by an array collection of objects? What I mean is I know how to set the overall border colour of a tilelist but how can you set each object to have a border colour within this code:-

       

       

       

       

      <?xml version="1.0" encoding="utf-8"?>

       

      <mx:Application

       

      xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:components="components.*" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#545351, #E3DFDF]">

       

       

       

       

      <mx:Script>

       

       

      <![CDATA[

       

      [

       

       

       

       

       

       

       

      Bindable

      ]

       

       

      [

       

       

       

       

       

       

       

      Embed(source="assets/images/asda_small.png"

      )]

       

       

       

       

       

       

       

       

       

       

      public var

      image1:Class;

       

       

       

      [

       

       

       

       

       

       

       

      Bindable

      ]

       

       

      [

       

       

       

       

       

       

       

      Embed(source="assets/images/tesco_small.png"

      )]

       

       

       

       

      public var

      image2:Class;

       

       

       

      [

       

       

       

       

       

       

       

      Bindable

      ]

       

       

      [

       

       

       

       

       

       

       

      Embed(source="assets/images/sainsburys_small.png"

      )]

       

       

       

       

       

       

       

       

       

       

      public var

      image3:Class;

       

       

       

      [

       

       

       

       

       

       

       

      Bindable

      ]

       

       

      [

       

       

       

       

       

       

       

      Embed(source="assets/images/morrisons_small.png"

      )]

       

       

       

       

       

       

       

       

       

       

      public var

      image4:Class;

       

       

       

       

       

      ]]>

       

      </mx:Script>

       

       

      <mx:ArrayCollection id="icons">

       

       

      <mx:Object id="asdaSmallImage" icon="image1" largeImage="assets/images/asda_small.png" title="Asda" description="Asda description will go here" />

       

       

      <mx:Object id="tescoSmallImage" icon="image2" largeImage="assets/images/tesco_small.png" title="Tesco" description="Tesco description will go here"

      />

       

       

      <mx:Object id="sainsburysSmallImage" icon="image3" largeImage="assets/images/sainsburys_small.png" title="Sainsbury's" description="Sainsbury's description will go here" />

       

       

      <mx:Object id="morrisonsSmallImage" icon="image4" largeImage="assets/images/morrisons_small.png" title="Morrisons" description="Morrison's description will go here"/>

      </mx:ArrayCollection>

       

       

       

      <mx:TileList paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10" dragEnabled="true" dragMoveEnabled="true" dropEnabled="true" id="LinkChoice" height="300" width="100%" bottom="100" left="10" right="10" maxColumns="5" rowHeight="145" columnWidth="125" dataProvider="{icons}" backgroundColor="#000000" borderColor="#FFFFFF">

       

       

      </mx:TileList>

       

       

      </mx:Application>