<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Flex Examples &#187; TileList</title>
	<atom:link href="http://blog.flexexamples.com/category/halo/tilelist/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Wed, 26 Jan 2011 18:09:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Alternating tile background colors for items in a TileList control in Flex</title>
		<link>http://blog.flexexamples.com/2008/08/10/alternating-tile-background-colors-for-items-in-a-tilelist-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/08/10/alternating-tile-background-colors-for-items-in-a-tilelist-control-in-flex/#comments</comments>
		<pubDate>Sun, 10 Aug 2008 19:47:21 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[TileList]]></category>
		<category><![CDATA[alternatingItemColors]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/08/10/alternating-tile-background-colors-for-items-in-a-tilelist-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can set alternating background colors for tiles in a Flex TileList control by setting the alternatingItemColors style using MXML, CSS or ActionScript.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_alternatingItemColors_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/08/10/alternating-tile-background-colors-for-items-in-a-tilelist-control-in-flex/ --&#62; &#60;mx:Application name="TileList_alternatingItemColors_test" xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:ArrayCollection id="arrColl"&#62; &#60;mx:source&#62; &#60;mx:Array&#62; &#60;mx:Object [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set alternating background colors for tiles in a Flex TileList control by setting the <code>alternatingItemColors</code> style using MXML, CSS or ActionScript.</p>
<p>Full code after the jump.</p>
<p><span id="more-739"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_alternatingItemColors_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/08/10/alternating-tile-background-colors-for-items-in-a-tilelist-control-in-flex/ --&gt;
&lt;mx:Application name="TileList_alternatingItemColors_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:ArrayCollection id="arrColl"&gt;
        &lt;mx:source&gt;
            &lt;mx:Array&gt;
                &lt;mx:Object label="One" /&gt;
                &lt;mx:Object label="Two" /&gt;
                &lt;mx:Object label="Three" /&gt;
                &lt;mx:Object label="Four" /&gt;
                &lt;mx:Object label="Five" /&gt;
                &lt;mx:Object label="Six" /&gt;
                &lt;mx:Object label="Seven" /&gt;
                &lt;mx:Object label="Eight" /&gt;
                &lt;mx:Object label="Nine" /&gt;
                &lt;mx:Object label="Ten" /&gt;
                &lt;mx:Object label="Eleven" /&gt;
                &lt;mx:Object label="Twelve" /&gt;
            &lt;/mx:Array&gt;
        &lt;/mx:source&gt;
    &lt;/mx:ArrayCollection&gt;

    &lt;mx:TileList id="tileList"
            dataProvider="{arrColl}"
            columnCount="4"
            columnWidth="120"
            rowCount="3"
            rowHeight="80"
            alternatingItemColors="[#FFFFFF,#CCCCCC,#999999]" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_alternatingItemColors_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/TileList_alternatingItemColors_test/bin/main.html" width="100%" height="300"></iframe></p>
<p>You can also set the <code>alternatingItemColors</code> style in an external .CSS file or &lt;mx:Style /&gt; block, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_alternatingItemColors_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/08/10/alternating-tile-background-colors-for-items-in-a-tilelist-control-in-flex/ --&gt;
&lt;mx:Application name="TileList_alternatingItemColors_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        TileList {
            alternatingItemColors: #FFFFFF, #CCCCCC, #999999;
        }
    &lt;/mx:Style&gt;

    &lt;mx:ArrayCollection id="arrColl"&gt;
        &lt;mx:source&gt;
            &lt;mx:Array&gt;
                &lt;mx:Object label="One" /&gt;
                &lt;mx:Object label="Two" /&gt;
                &lt;mx:Object label="Three" /&gt;
                &lt;mx:Object label="Four" /&gt;
                &lt;mx:Object label="Five" /&gt;
                &lt;mx:Object label="Six" /&gt;
                &lt;mx:Object label="Seven" /&gt;
                &lt;mx:Object label="Eight" /&gt;
                &lt;mx:Object label="Nine" /&gt;
                &lt;mx:Object label="Ten" /&gt;
                &lt;mx:Object label="Eleven" /&gt;
                &lt;mx:Object label="Twelve" /&gt;
            &lt;/mx:Array&gt;
        &lt;/mx:source&gt;
    &lt;/mx:ArrayCollection&gt;

    &lt;mx:TileList id="tileList"
            dataProvider="{arrColl}"
            columnCount="4"
            columnWidth="120"
            rowCount="3"
            rowHeight="80" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Or, you can set the <code>alternatingItemColors</code> style using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_alternatingItemColors_test/bin/srcview/source/main3.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/08/10/alternating-tile-background-colors-for-items-in-a-tilelist-control-in-flex/ --&gt;
&lt;mx:Application name="TileList_alternatingItemColors_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            private function init():void {
                var colorArr:Array = [0xFFFFFF, 0xCCCCCC, 0x999999];
                tileList.setStyle("alternatingItemColors", colorArr);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ArrayCollection id="arrColl"&gt;
        &lt;mx:source&gt;
            &lt;mx:Array&gt;
                &lt;mx:Object label="One" /&gt;
                &lt;mx:Object label="Two" /&gt;
                &lt;mx:Object label="Three" /&gt;
                &lt;mx:Object label="Four" /&gt;
                &lt;mx:Object label="Five" /&gt;
                &lt;mx:Object label="Six" /&gt;
                &lt;mx:Object label="Seven" /&gt;
                &lt;mx:Object label="Eight" /&gt;
                &lt;mx:Object label="Nine" /&gt;
                &lt;mx:Object label="Ten" /&gt;
                &lt;mx:Object label="Eleven" /&gt;
                &lt;mx:Object label="Twelve" /&gt;
            &lt;/mx:Array&gt;
        &lt;/mx:source&gt;
    &lt;/mx:ArrayCollection&gt;

    &lt;mx:TileList id="tileList"
            dataProvider="{arrColl}"
            columnCount="4"
            columnWidth="120"
            rowCount="3"
            rowHeight="80"
            initialize="init();" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Due to popular demand, here is the &#8220;same&#8221; example in a more ActionScript friendly format:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_alternatingItemColors_test/bin/srcview/source/main4.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/08/10/alternating-tile-background-colors-for-items-in-a-tilelist-control-in-flex/ --&gt;
&lt;mx:Application name="TileList_alternatingItemColors_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"
        initialize="init();"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.collections.ArrayCollection;
            import mx.controls.TileList;

            private var arrColl:ArrayCollection;
            private var tileList:TileList;

            private function init():void {
                var arrColl:ArrayCollection = new ArrayCollection();
                arrColl.addItem({label:"One"});
                arrColl.addItem({label:"Two"});
                arrColl.addItem({label:"Three"});
                arrColl.addItem({label:"Four"});
                arrColl.addItem({label:"Five"});
                arrColl.addItem({label:"Six"});
                arrColl.addItem({label:"Seven"});
                arrColl.addItem({label:"Eight"});
                arrColl.addItem({label:"Nine"});
                arrColl.addItem({label:"Ten"});
                arrColl.addItem({label:"Eleven"});
                arrColl.addItem({label:"Twelve"});

                var colorArr:Array = [0xFFFFFF, 0xCCCCCC, 0x999999];

                tileList = new TileList();
                tileList.dataProvider = arrColl;
                tileList.columnCount = 4;
                tileList.columnWidth = 120;
                tileList.rowCount = 3;
                tileList.rowHeight = 80;
                tileList.setStyle("alternatingItemColors", colorArr);
                addChild(tileList);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Alternating tile background colors for items in a TileList control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/08/10/alternating-tile-background-colors-for-items-in-a-tilelist-control-in-flex/',contentID: 'post-739',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'alternatingItemColors',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/08/10/alternating-tile-background-colors-for-items-in-a-tilelist-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting the row height of a tile in a TileList control in Flex</title>
		<link>http://blog.flexexamples.com/2008/08/09/setting-the-row-height-of-a-tile-in-a-tilelist-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/08/09/setting-the-row-height-of-a-tile-in-a-tilelist-control-in-flex/#comments</comments>
		<pubDate>Sun, 10 Aug 2008 06:58:05 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[TileList]]></category>
		<category><![CDATA[rowHeight]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/08/09/setting-the-row-height-of-a-tile-in-a-tilelist-control-in-flex/</guid>
		<description><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/08/09/setting-the-column-width-of-a-tile-in-a-tilelist-control-in-flex/">&#8220;Setting the column width of a tile in a TileList control in Flex&#8221;</a>, we saw how you could change the width of a tile in a Flex TileList control by setting the columnWidth property.</p> <p>The following example shows how you can set the row height of a tile in a [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/08/09/setting-the-column-width-of-a-tile-in-a-tilelist-control-in-flex/">&#8220;Setting the column width of a tile in a TileList control in Flex&#8221;</a>, we saw how you could change the width of a tile in a Flex TileList control by setting the <code>columnWidth</code> property.</p>
<p>The following example shows how you can set the row height of a tile in a Flex TileList control by setting the <code>rowHeight</code> property in MXML and ActionScript.</p>
<p>Full code after the jump.</p>
<p><span id="more-738"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_rowHeight_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/08/09/setting-the-row-height-of-a-tile-in-a-tilelist-control-in-flex/ --&gt;
&lt;mx:Application name="TileList_rowHeight_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:ArrayCollection id="arrColl"&gt;
        &lt;mx:source&gt;
            &lt;mx:Array&gt;
                &lt;mx:Object label="One" /&gt;
                &lt;mx:Object label="Two" /&gt;
                &lt;mx:Object label="Three" /&gt;
                &lt;mx:Object label="Four" /&gt;
                &lt;mx:Object label="Five" /&gt;
                &lt;mx:Object label="Six" /&gt;
                &lt;mx:Object label="Seven" /&gt;
                &lt;mx:Object label="Eight" /&gt;
                &lt;mx:Object label="Nine" /&gt;
                &lt;mx:Object label="Ten" /&gt;
            &lt;/mx:Array&gt;
        &lt;/mx:source&gt;
    &lt;/mx:ArrayCollection&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="rowHeight:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="50"
                        maximum="100"
                        value="100"
                        snapInterval="1"
                        tickInterval="5"
                        liveDragging="true" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TileList id="tileList"
            dataProvider="{arrColl}"
            columnCount="5"
            columnWidth="100"
            rowCount="2"
            rowHeight="{slider.value}"
            alternatingItemColors="[#FFFFFF,#EEEEEE]" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_rowHeight_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/TileList_rowHeight_test/bin/main.html" width="100%" height="300"></iframe></p>
<p>You can also set the <code>rowHeight</code> property using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_rowHeight_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/08/09/setting-the-row-height-of-a-tile-in-a-tilelist-control-in-flex/ --&gt;
&lt;mx:Application name="TileList_rowHeight_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.SliderEvent;

            private function slider_change(evt:SliderEvent):void {
                tileList.rowHeight = evt.value;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ArrayCollection id="arrColl"&gt;
        &lt;mx:source&gt;
            &lt;mx:Array&gt;
                &lt;mx:Object label="One" /&gt;
                &lt;mx:Object label="Two" /&gt;
                &lt;mx:Object label="Three" /&gt;
                &lt;mx:Object label="Four" /&gt;
                &lt;mx:Object label="Five" /&gt;
                &lt;mx:Object label="Six" /&gt;
                &lt;mx:Object label="Seven" /&gt;
                &lt;mx:Object label="Eight" /&gt;
                &lt;mx:Object label="Nine" /&gt;
                &lt;mx:Object label="Ten" /&gt;
            &lt;/mx:Array&gt;
        &lt;/mx:source&gt;
    &lt;/mx:ArrayCollection&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="rowHeight:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="50"
                        maximum="100"
                        value="100"
                        snapInterval="1"
                        tickInterval="5"
                        liveDragging="true"
                        change="slider_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TileList id="tileList"
            dataProvider="{arrColl}"
            columnCount="5"
            columnWidth="100"
            rowCount="2"
            rowHeight="100"
            alternatingItemColors="[#FFFFFF,#EEEEEE]" /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the row height of a tile in a TileList control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/08/09/setting-the-row-height-of-a-tile-in-a-tilelist-control-in-flex/',contentID: 'post-738',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'rowHeight',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/08/09/setting-the-row-height-of-a-tile-in-a-tilelist-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting the column width of a tile in a TileList control in Flex</title>
		<link>http://blog.flexexamples.com/2008/08/09/setting-the-column-width-of-a-tile-in-a-tilelist-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/08/09/setting-the-column-width-of-a-tile-in-a-tilelist-control-in-flex/#comments</comments>
		<pubDate>Sun, 10 Aug 2008 06:49:52 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[TileList]]></category>
		<category><![CDATA[columnWidth]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/08/09/setting-the-column-width-of-a-tile-in-a-tilelist-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can set the column width of a tile in a Flex TileList control by setting the columnWidth property in MXML and ActionScript.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_columnWidth_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/08/09/setting-the-column-width-of-a-tile-in-a-tilelist-control-in-flex/ --&#62; &#60;mx:Application name="TileList_columnWidth_test" xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:ArrayCollection id="arrColl"&#62; &#60;mx:source&#62; &#60;mx:Array&#62; &#60;mx:Object [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the column width of a tile in a Flex TileList control by setting the <code>columnWidth</code> property in MXML and ActionScript.</p>
<p>Full code after the jump.</p>
<p><span id="more-737"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_columnWidth_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/08/09/setting-the-column-width-of-a-tile-in-a-tilelist-control-in-flex/ --&gt;
&lt;mx:Application name="TileList_columnWidth_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:ArrayCollection id="arrColl"&gt;
        &lt;mx:source&gt;
            &lt;mx:Array&gt;
                &lt;mx:Object label="One" /&gt;
                &lt;mx:Object label="Two" /&gt;
                &lt;mx:Object label="Three" /&gt;
                &lt;mx:Object label="Four" /&gt;
                &lt;mx:Object label="Five" /&gt;
                &lt;mx:Object label="Six" /&gt;
                &lt;mx:Object label="Seven" /&gt;
                &lt;mx:Object label="Eight" /&gt;
                &lt;mx:Object label="Nine" /&gt;
                &lt;mx:Object label="Ten" /&gt;
            &lt;/mx:Array&gt;
        &lt;/mx:source&gt;
    &lt;/mx:ArrayCollection&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="columnWidth:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="50"
                        maximum="100"
                        value="100"
                        snapInterval="1"
                        tickInterval="5"
                        liveDragging="true" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TileList id="tileList"
            dataProvider="{arrColl}"
            columnCount="5"
            columnWidth="{slider.value}"
            rowCount="2"
            rowHeight="100"
            alternatingItemColors="[#FFFFFF,#EEEEEE]" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_columnWidth_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/TileList_columnWidth_test/bin/main.html" width="100%" height="300"></iframe></p>
<p>You an also set the <code>columnWidth</code> property using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_columnWidth_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/08/09/setting-the-column-width-of-a-tile-in-a-tilelist-control-in-flex/ --&gt;
&lt;mx:Application name="TileList_columnWidth_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.SliderEvent;

            private function slider_change(evt:SliderEvent):void {
                tileList.columnWidth = evt.value;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ArrayCollection id="arrColl"&gt;
        &lt;mx:source&gt;
            &lt;mx:Array&gt;
                &lt;mx:Object label="One" /&gt;
                &lt;mx:Object label="Two" /&gt;
                &lt;mx:Object label="Three" /&gt;
                &lt;mx:Object label="Four" /&gt;
                &lt;mx:Object label="Five" /&gt;
                &lt;mx:Object label="Six" /&gt;
                &lt;mx:Object label="Seven" /&gt;
                &lt;mx:Object label="Eight" /&gt;
                &lt;mx:Object label="Nine" /&gt;
                &lt;mx:Object label="Ten" /&gt;
            &lt;/mx:Array&gt;
        &lt;/mx:source&gt;
    &lt;/mx:ArrayCollection&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="columnWidth:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="50"
                        maximum="100"
                        value="100"
                        snapInterval="1"
                        tickInterval="5"
                        liveDragging="true"
                        change="slider_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TileList id="tileList"
            dataProvider="{arrColl}"
            columnCount="5"
            columnWidth="100"
            rowCount="2"
            rowHeight="100"
            alternatingItemColors="[#FFFFFF,#EEEEEE]" /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the column width of a tile in a TileList control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/08/09/setting-the-column-width-of-a-tile-in-a-tilelist-control-in-flex/',contentID: 'post-737',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'columnWidth',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/08/09/setting-the-column-width-of-a-tile-in-a-tilelist-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting a specific number of rows in a TileList control in Flex</title>
		<link>http://blog.flexexamples.com/2008/08/08/setting-a-specific-number-of-rows-in-a-tilelist-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/08/08/setting-a-specific-number-of-rows-in-a-tilelist-control-in-flex/#comments</comments>
		<pubDate>Sat, 09 Aug 2008 06:51:47 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[TileList]]></category>
		<category><![CDATA[rowCount]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/08/08/setting-a-specific-number-of-rows-in-a-tilelist-control-in-flex/</guid>
		<description><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/08/07/setting-a-specific-number-of-columns-in-a-tilelist-control-in-flex/">&#8220;Setting a specific number of columns in a TileList control in Flex&#8221;</a>, we saw how to resize a TileList control based on a specific number of columns by setting the columnCount property.</p> <p>The following example shows how you can resize a Flex TileList control to a certain number of rows [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/08/07/setting-a-specific-number-of-columns-in-a-tilelist-control-in-flex/">&#8220;Setting a specific number of columns in a TileList control in Flex&#8221;</a>, we saw how to resize a TileList control based on a specific number of columns by setting the <code>columnCount</code> property.</p>
<p>The following example shows how you can resize a Flex TileList control to a certain number of rows by setting the <code>rowCount</code> property in MXML or ActionScript.</p>
<p>Full code after the jump.</p>
<p><span id="more-736"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_rowCount_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/08/08/setting-a-specific-number-of-rows-in-a-tilelist-control-in-flex/ --&gt;
&lt;mx:Application name="TileList_rowCount_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:ArrayCollection id="arrColl"&gt;
        &lt;mx:source&gt;
            &lt;mx:Array&gt;
                &lt;mx:Object label="One" /&gt;
                &lt;mx:Object label="Two" /&gt;
                &lt;mx:Object label="Three" /&gt;
                &lt;mx:Object label="Four" /&gt;
                &lt;mx:Object label="Five" /&gt;
                &lt;mx:Object label="Six" /&gt;
                &lt;mx:Object label="Seven" /&gt;
                &lt;mx:Object label="Eight" /&gt;
                &lt;mx:Object label="Nine" /&gt;
                &lt;mx:Object label="Ten" /&gt;
            &lt;/mx:Array&gt;
        &lt;/mx:source&gt;
    &lt;/mx:ArrayCollection&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="rowCount:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="1"
                        maximum="3"
                        value="3"
                        snapInterval="1"
                        tickInterval="1"
                        liveDragging="true" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TileList id="tileList"
            dataProvider="{arrColl}"
            columnCount="4"
            columnWidth="100"
            rowCount="{slider.value}"
            rowHeight="50"
            verticalScrollPolicy="on"
            dragEnabled="true"
            dragMoveEnabled="true"
            dropEnabled="true" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_rowCount_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/TileList_rowCount_test/bin/main.html" width="100%" height="250"></iframe></p>
<p>You can also set the <code>rowCount</code> property using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_rowCount_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/08/08/setting-a-specific-number-of-rows-in-a-tilelist-control-in-flex/ --&gt;
&lt;mx:Application name="TileList_rowCount_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.SliderEvent;

            private function slider_change(evt:SliderEvent):void {
                tileList.rowCount = evt.value;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ArrayCollection id="arrColl"&gt;
        &lt;mx:source&gt;
            &lt;mx:Array&gt;
                &lt;mx:Object label="One" /&gt;
                &lt;mx:Object label="Two" /&gt;
                &lt;mx:Object label="Three" /&gt;
                &lt;mx:Object label="Four" /&gt;
                &lt;mx:Object label="Five" /&gt;
                &lt;mx:Object label="Six" /&gt;
                &lt;mx:Object label="Seven" /&gt;
                &lt;mx:Object label="Eight" /&gt;
                &lt;mx:Object label="Nine" /&gt;
                &lt;mx:Object label="Ten" /&gt;
            &lt;/mx:Array&gt;
        &lt;/mx:source&gt;
    &lt;/mx:ArrayCollection&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="rowCount:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="1"
                        maximum="3"
                        value="3"
                        snapInterval="1"
                        tickInterval="1"
                        liveDragging="true"
                        change="slider_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TileList id="tileList"
            dataProvider="{arrColl}"
            columnCount="4"
            columnWidth="100"
            rowCount="3"
            rowHeight="50"
            verticalScrollPolicy="on" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Due to popular demand, here is the &#8220;same&#8221; example in a more ActionScript friendly format:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_rowCount_test/bin/srcview/source/main3.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/08/08/setting-a-specific-number-of-rows-in-a-tilelist-control-in-flex/ --&gt;
&lt;mx:Application name="TileList_rowCount_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"
        initialize="init();"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.collections.ArrayCollection;
            import mx.containers.ApplicationControlBar;
            import mx.containers.Form;
            import mx.containers.FormItem;
            import mx.controls.HSlider;
            import mx.controls.TileList;
            import mx.core.ScrollPolicy;
            import mx.events.SliderEvent;

            private var arrColl:ArrayCollection;
            private var slider:HSlider;
            private var tileList:TileList;

            private function init():void {
                arrColl = new ArrayCollection();
                arrColl.addItem({label:"One"});
                arrColl.addItem({label:"Two"});
                arrColl.addItem({label:"Three"});
                arrColl.addItem({label:"Four"});
                arrColl.addItem({label:"Five"});
                arrColl.addItem({label:"Six"});
                arrColl.addItem({label:"Seven"});
                arrColl.addItem({label:"Eight"});
                arrColl.addItem({label:"Nine"});
                arrColl.addItem({label:"Ten"});

                slider = new HSlider();
                slider.minimum = 1;
                slider.maximum = 3;
                slider.value = 3;
                slider.snapInterval = 1;
                slider.tickInterval = 1;
                slider.liveDragging = true;
                slider.addEventListener(SliderEvent.CHANGE, slider_change);

                var formItem:FormItem = new FormItem();
                formItem.label = "rowCount:";
                formItem.addChild(slider);

                var form:Form = new Form();
                form.styleName = "plain";
                form.addChild(formItem);

                var appControlBar:ApplicationControlBar = new ApplicationControlBar();
                appControlBar.dock = true;
                appControlBar.addChild(form);
                Application.application.addChildAt(appControlBar, 0);

                tileList = new TileList();
                tileList.dataProvider = arrColl;
                tileList.columnCount = 4;
                tileList.columnWidth = 100;
                tileList.rowCount = 3;
                tileList.rowHeight = 50;
                tileList.verticalScrollPolicy = ScrollPolicy.ON;
                addChild(tileList);
            }

            private function slider_change(evt:SliderEvent):void {
                tileList.rowCount = evt.value;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting a specific number of rows in a TileList control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/08/08/setting-a-specific-number-of-rows-in-a-tilelist-control-in-flex/',contentID: 'post-736',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'rowCount',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/08/08/setting-a-specific-number-of-rows-in-a-tilelist-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Setting a specific number of columns in a TileList control in Flex</title>
		<link>http://blog.flexexamples.com/2008/08/07/setting-a-specific-number-of-columns-in-a-tilelist-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/08/07/setting-a-specific-number-of-columns-in-a-tilelist-control-in-flex/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 06:53:20 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[TileList]]></category>
		<category><![CDATA[columnCount]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/08/07/setting-a-specific-number-of-columns-in-a-tilelist-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can resize a Flex TileList control to a certain number of columns by setting the columnCount property in MXML or ActionScript.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_columnCount_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/08/07/setting-a-specific-number-of-columns-in-a-tilelist-control-in-flex/ --&#62; &#60;mx:Application name="TileList_columnCount_test" xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:ArrayCollection id="arrColl"&#62; &#60;mx:source&#62; &#60;mx:Array&#62; &#60;mx:Object label="One" [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can resize a Flex TileList control to a certain number of columns by setting the <code>columnCount</code> property in MXML or ActionScript.</p>
<p>Full code after the jump.</p>
<p><span id="more-735"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_columnCount_test/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/08/07/setting-a-specific-number-of-columns-in-a-tilelist-control-in-flex/ --&gt;
&lt;mx:Application name="TileList_columnCount_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:ArrayCollection id="arrColl"&gt;
        &lt;mx:source&gt;
            &lt;mx:Array&gt;
                &lt;mx:Object label="One" /&gt;
                &lt;mx:Object label="Two" /&gt;
                &lt;mx:Object label="Three" /&gt;
                &lt;mx:Object label="Four" /&gt;
                &lt;mx:Object label="Five" /&gt;
                &lt;mx:Object label="Six" /&gt;
                &lt;mx:Object label="Seven" /&gt;
                &lt;mx:Object label="Eight" /&gt;
                &lt;mx:Object label="Nine" /&gt;
                &lt;mx:Object label="Ten" /&gt;
            &lt;/mx:Array&gt;
        &lt;/mx:source&gt;
    &lt;/mx:ArrayCollection&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="columnCount:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="1"
                        maximum="5"
                        value="5"
                        snapInterval="1"
                        tickInterval="1"
                        liveDragging="true" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TileList id="tileList"
            dataProvider="{arrColl}"
            columnCount="{slider.value}"
            columnWidth="100"
            rowCount="2"
            rowHeight="100"
            verticalScrollPolicy="on" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_columnCount_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/TileList_columnCount_test/bin/main.html" width="100%" height="300"></iframe></p>
<p>You can also set the <code>columnCount</code> property using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_columnCount_test/bin/srcview/source/main2.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/08/07/setting-a-specific-number-of-columns-in-a-tilelist-control-in-flex/ --&gt;
&lt;mx:Application name="TileList_columnCount_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.SliderEvent;

            private function slider_change(evt:SliderEvent):void {
                tileList.columnCount = evt.value;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ArrayCollection id="arrColl"&gt;
        &lt;mx:source&gt;
            &lt;mx:Array&gt;
                &lt;mx:Object label="One" /&gt;
                &lt;mx:Object label="Two" /&gt;
                &lt;mx:Object label="Three" /&gt;
                &lt;mx:Object label="Four" /&gt;
                &lt;mx:Object label="Five" /&gt;
                &lt;mx:Object label="Six" /&gt;
                &lt;mx:Object label="Seven" /&gt;
                &lt;mx:Object label="Eight" /&gt;
                &lt;mx:Object label="Nine" /&gt;
                &lt;mx:Object label="Ten" /&gt;
            &lt;/mx:Array&gt;
        &lt;/mx:source&gt;
    &lt;/mx:ArrayCollection&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="columnCount:"&gt;
                &lt;mx:HSlider id="slider"
                        minimum="1"
                        maximum="5"
                        value="5"
                        snapInterval="1"
                        tickInterval="1"
                        liveDragging="true"
                        change="slider_change(event);" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TileList id="tileList"
            dataProvider="{arrColl}"
            columnCount="5"
            columnWidth="100"
            rowCount="2"
            rowHeight="100"
            verticalScrollPolicy="on" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>Due to popular demand, here is the &#8220;same&#8221; example in a more ActionScript friendly format:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_columnCount_test/bin/srcview/source/main3.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/08/07/setting-a-specific-number-of-columns-in-a-tilelist-control-in-flex/ --&gt;
&lt;mx:Application name="TileList_columnCount_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"
        initialize="init();"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.collections.ArrayCollection;
            import mx.containers.ApplicationControlBar;
            import mx.containers.Form;
            import mx.containers.FormItem;
            import mx.controls.HSlider;
            import mx.controls.TileList;
            import mx.core.ScrollPolicy;
            import mx.events.SliderEvent;

            private var arrColl:ArrayCollection;
            private var slider:HSlider;
            private var tileList:TileList;

            private function init():void {
                arrColl = new ArrayCollection();
                arrColl.addItem({label:"One"});
                arrColl.addItem({label:"Two"});
                arrColl.addItem({label:"Three"});
                arrColl.addItem({label:"Four"});
                arrColl.addItem({label:"Five"});
                arrColl.addItem({label:"Six"});
                arrColl.addItem({label:"Seven"});
                arrColl.addItem({label:"Eight"});
                arrColl.addItem({label:"Nine"});
                arrColl.addItem({label:"Ten"});

                slider = new HSlider();
                slider.minimum = 1;
                slider.maximum = 5;
                slider.value = 5;
                slider.snapInterval = 1;
                slider.tickInterval = 1;
                slider.liveDragging = true;
                slider.addEventListener(SliderEvent.CHANGE, slider_change);

                var formItem:FormItem = new FormItem();
                formItem.label = "columnCount:";
                formItem.addChild(slider);

                var form:Form = new Form();
                form.styleName = "plain";
                form.addChild(formItem);

                var appControlBar:ApplicationControlBar = new ApplicationControlBar();
                appControlBar.dock = true;
                appControlBar.addChild(form);
                Application.application.addChildAt(appControlBar, 0);

                tileList = new TileList();
                tileList.dataProvider = arrColl;
                tileList.columnCount = 5;
                tileList.columnWidth = 100;
                tileList.rowCount = 2;
                tileList.rowHeight = 100;
                tileList.verticalScrollPolicy = ScrollPolicy.ON;
                addChild(tileList);
            }

            private function slider_change(evt:SliderEvent):void {
                tileList.columnCount = evt.value;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting a specific number of columns in a TileList control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/08/07/setting-a-specific-number-of-columns-in-a-tilelist-control-in-flex/',contentID: 'post-735',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'columnCount',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/08/07/setting-a-specific-number-of-columns-in-a-tilelist-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Dynamically loading XML files using the HTTPService tag</title>
		<link>http://blog.flexexamples.com/2008/03/29/dynamically-loading-xml-files-using-the-httpservice-tag/</link>
		<comments>http://blog.flexexamples.com/2008/03/29/dynamically-loading-xml-files-using-the-httpservice-tag/#comments</comments>
		<pubDate>Sun, 30 Mar 2008 06:59:35 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[HTTPService]]></category>
		<category><![CDATA[TileList]]></category>
		<category><![CDATA[XMLListCollection]]></category>
		<category><![CDATA[fault]]></category>
		<category><![CDATA[send()]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/29/dynamically-loading-xml-files-using-the-httpservice-tag/</guid>
		<description><![CDATA[<p>In previous examples, <a href="http://blog.flexexamples.com/2008/03/08/creating-a-simple-image-gallery-with-the-flex-tilelist-control/">&#8220;Creating a simple image gallery with the Flex TileList control&#8221;</a> and <a href="http://blog.flexexamples.com/2008/02/15/creating-a-simple-image-gallery-with-the-flex-horizontallist-control/">&#8220;Creating a simple image gallery with the Flex HorizontalList control&#8221;</a>, we saw how you could create a simple image gallery using the TileList and HorizontalList controls.</p> <p>The following example shows how you can load XML files using the HTTPService [...]]]></description>
			<content:encoded><![CDATA[<p>In previous examples, <a href="http://blog.flexexamples.com/2008/03/08/creating-a-simple-image-gallery-with-the-flex-tilelist-control/">&#8220;Creating a simple image gallery with the Flex TileList control&#8221;</a> and <a href="http://blog.flexexamples.com/2008/02/15/creating-a-simple-image-gallery-with-the-flex-horizontallist-control/">&#8220;Creating a simple image gallery with the Flex HorizontalList control&#8221;</a>, we saw how you could create a simple image gallery using the TileList and HorizontalList controls.</p>
<p>The following example shows how you can load XML files using the HTTPService tag so that you can dynamically load different galleries.</p>
<p>Full code after the jump.</p>
<p><span id="more-577"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/HTTPService_send_test_2/bin/srcview/source/main.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/03/29/dynamically-loading-xml-files-using-the-httpservice-tag/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.rpc.events.ResultEvent;
            import mx.rpc.events.FaultEvent;
            import mx.controls.Alert;

            private var alert:Alert;

            private function loadGallery(src:String):void {
                httpService.url = src;
                httpService.send();
            }

            private function httpService_fault(evt:FaultEvent):void {
                var title:String = evt.type + " (" + evt.fault.faultCode + ")";
                var text:String = evt.fault.faultString;
                alert = Alert.show(text, title);
                xmlListColl.removeAll();
            }

            private function httpService_result(evt:ResultEvent):void {
                var xmlList:XMLList = XML(evt.result).images.image;
                xmlListColl = new XMLListCollection(xmlList);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:XMLListCollection id="xmlListColl" /&gt;

    &lt;mx:HTTPService id="httpService"
            resultFormat="e4x"
            fault="httpService_fault(event);"
            result="httpService_result(event)" /&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button label="gallery 1"
                click="loadGallery('gallery1.xml');" /&gt;
        &lt;mx:Button label="gallery 2"
                click="loadGallery('gallery2.xml');" /&gt;

        &lt;mx:Button label="gallery 404"
                click="loadGallery('gallery404.xml');" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TileList id="tileList"
            dataProvider="{xmlListColl}"
            itemRenderer="TileListItemRenderer"
            columnCount="3"
            columnWidth="150"
            rowCount="2"
            rowHeight="100" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="download">TileListItemRenderer.mxml</p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/03/29/dynamically-loading-xml-files-using-the-httpservice-tag/ --&gt;
&lt;mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"&gt;

    &lt;mx:Image source="{data.@src}"
            horizontalCenter="0"
            verticalCenter="0" /&gt;

    &lt;mx:Label text="{data.@lbl}"
            fontWeight="bold"
            horizontalCenter="0"
            bottom="0" /&gt;

&lt;/mx:Canvas&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/HTTPService_send_test_2/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/HTTPService_send_test_2/bin/main.html" width="100%" height="350"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Dynamically loading XML files using the HTTPService tag on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/03/29/dynamically-loading-xml-files-using-the-httpservice-tag/',contentID: 'post-577',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'fault,send()',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/03/29/dynamically-loading-xml-files-using-the-httpservice-tag/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Setting the layout direction of a TileList control in Flex</title>
		<link>http://blog.flexexamples.com/2008/03/23/setting-the-layout-direction-of-a-tilelist-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/03/23/setting-the-layout-direction-of-a-tilelist-control-in-flex/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 05:06:51 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[TileList]]></category>
		<category><![CDATA[direction]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/23/setting-the-layout-direction-of-a-tilelist-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can toggle the item layout direction of the Flex TileList control by setting the direction property to &#8220;horizontal&#8221; or &#8220;vertical&#8221;.</p> <p>Full code after the jump.</p> <p></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/03/23/setting-the-layout-direction-of-a-tilelist-control-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Script&#62; &#60;![CDATA[ import mx.events.ItemClickEvent; private function toggleButtonBar_itemClick(evt:ItemClickEvent):void { tileList.direction = evt.item.label; } [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can toggle the item layout direction of the Flex TileList control by setting the <code>direction</code> property to &#8220;horizontal&#8221; or &#8220;vertical&#8221;.</p>
<p>Full code after the jump.</p>
<p><span id="more-557"></span></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/03/23/setting-the-layout-direction-of-a-tilelist-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.ItemClickEvent;

            private function toggleButtonBar_itemClick(evt:ItemClickEvent):void {
                tileList.direction = evt.item.label;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Array id="arr"&gt;
        &lt;mx:Object label="horizontal" /&gt;
        &lt;mx:Object label="vertical" /&gt;
    &lt;/mx:Array&gt;

    &lt;mx:ArrayCollection id="arrColl"&gt;
        &lt;mx:source&gt;
            &lt;mx:Array&gt;
                &lt;mx:Object label="ColdFusion" icon="@Embed('assets/cf_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Dreamweaver" icon="@Embed('assets/dw_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Fireworks" icon="@Embed('assets/fw_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Flash" icon="@Embed('assets/fl_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Flash Player" icon="@Embed('assets/fl_player_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Flex" icon="@Embed('assets/fx_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Illustrator" icon="@Embed('assets/ai_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Lightroom" icon="@Embed('assets/lr_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Photoshop" icon="@Embed('assets/ps_appicon-tn.gif')" /&gt;
            &lt;/mx:Array&gt;
        &lt;/mx:source&gt;
    &lt;/mx:ArrayCollection&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="direction:"&gt;
                &lt;mx:ToggleButtonBar id="toggleButtonBar"
                        dataProvider="{arr}"
                        selectedIndex="0"
                        itemClick="toggleButtonBar_itemClick(event);" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TileList id="tileList"
            dataProvider="{arrColl}"
            alternatingItemColors="[#FFFFFF,#EEEEEE]"
            columnCount="3"
            columnWidth="100"
            rowCount="2"
            rowHeight="100"
            direction="horizontal"
            horizontalScrollPolicy="on"
            verticalScrollPolicy="on" /&gt;

&lt;/mx:Application&gt;
</pre>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the layout direction of a TileList control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/03/23/setting-the-layout-direction-of-a-tilelist-control-in-flex/',contentID: 'post-557',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'direction',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/03/23/setting-the-layout-direction-of-a-tilelist-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Changing live dragging on a TileList control in Flex</title>
		<link>http://blog.flexexamples.com/2008/03/16/changing-live-dragging-on-a-tilelist-control-in-flex/</link>
		<comments>http://blog.flexexamples.com/2008/03/16/changing-live-dragging-on-a-tilelist-control-in-flex/#comments</comments>
		<pubDate>Sun, 16 Mar 2008 14:47:43 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[TileList]]></category>
		<category><![CDATA[liveDragging]]></category>
		<category><![CDATA[liveScrolling]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/16/changing-live-dragging-on-a-tilelist-control-in-flex/</guid>
		<description><![CDATA[<p>The following example shows how you can enable or disable live dragging on a Flex TileList control by setting the liveScrolling property.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_liveDragging_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/03/16/changing-live-dragging-on-a-tilelist-control-in-flex/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:ArrayCollection id="arrColl"&#62; &#60;mx:source&#62; &#60;mx:Array&#62; &#60;mx:Object label="ColdFusion" icon="@Embed('assets/cf_appicon-tn.gif')" /&#62; &#60;mx:Object label="Dreamweaver" icon="@Embed('assets/dw_appicon-tn.gif')" /&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can enable or disable live dragging on a Flex TileList control by setting the <code>liveScrolling</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-558"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_liveDragging_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/03/16/changing-live-dragging-on-a-tilelist-control-in-flex/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:ArrayCollection id="arrColl"&gt;
        &lt;mx:source&gt;
            &lt;mx:Array&gt;
                &lt;mx:Object label="ColdFusion" icon="@Embed('assets/cf_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Dreamweaver" icon="@Embed('assets/dw_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Fireworks" icon="@Embed('assets/fw_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Flash" icon="@Embed('assets/fl_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Flash Player" icon="@Embed('assets/fl_player_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Flex" icon="@Embed('assets/fx_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Illustrator" icon="@Embed('assets/ai_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Lightroom" icon="@Embed('assets/lr_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Photoshop" icon="@Embed('assets/ps_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="ColdFusion" icon="@Embed('assets/cf_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Dreamweaver" icon="@Embed('assets/dw_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Fireworks" icon="@Embed('assets/fw_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Flash" icon="@Embed('assets/fl_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Flash Player" icon="@Embed('assets/fl_player_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Flex" icon="@Embed('assets/fx_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Illustrator" icon="@Embed('assets/ai_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Lightroom" icon="@Embed('assets/lr_appicon-tn.gif')" /&gt;
                &lt;mx:Object label="Photoshop" icon="@Embed('assets/ps_appicon-tn.gif')" /&gt;
            &lt;/mx:Array&gt;
        &lt;/mx:source&gt;
    &lt;/mx:ArrayCollection&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="liveScrolling:"&gt;
                &lt;mx:CheckBox id="checkBox"
                        creationComplete="checkBox.selected = tileList.liveScrolling;" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:TileList id="tileList"
            dataProvider="{arrColl}"
            alternatingItemColors="[#FFFFFF,#EEEEEE]"
            columnCount="3"
            columnWidth="100"
            rowCount="2"
            rowHeight="100"
            direction="horizontal"
            verticalScrollPolicy="on"
            liveScrolling="{checkBox.selected}" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_liveDragging_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/TileList_liveDragging_test/bin/main.html" width="100%" height="300"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Changing live dragging on a TileList control in Flex on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/03/16/changing-live-dragging-on-a-tilelist-control-in-flex/',contentID: 'post-558',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'liveDragging,liveScrolling',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/03/16/changing-live-dragging-on-a-tilelist-control-in-flex/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Creating a simple image gallery with the Flex TileList control</title>
		<link>http://blog.flexexamples.com/2008/03/08/creating-a-simple-image-gallery-with-the-flex-tilelist-control/</link>
		<comments>http://blog.flexexamples.com/2008/03/08/creating-a-simple-image-gallery-with-the-flex-tilelist-control/#comments</comments>
		<pubDate>Sat, 08 Mar 2008 19:54:24 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Image]]></category>
		<category><![CDATA[PopUpManager]]></category>
		<category><![CDATA[TileList]]></category>
		<category><![CDATA[addPopUp()]]></category>
		<category><![CDATA[centerPopUp()]]></category>
		<category><![CDATA[itemRenderer]]></category>
		<category><![CDATA[removePopUp()]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/03/08/creating-a-simple-image-gallery-with-the-flex-tilelist-control/</guid>
		<description><![CDATA[<p>Similar to a previous example, <a href="http://blog.flexexamples.com/2008/02/15/creating-a-simple-image-gallery-with-the-flex-horizontallist-control/">&#8220;Creating a simple image gallery with the Flex HorizontalList control&#8221;</a>, the following example shows how you can create a simple photo gallery in Flex using the TileList control, Image control, and the PopUpManager class.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_itemClick_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/03/08/creating-a-simple-image-gallery-with-the-flex-tilelist-control/ [...]]]></description>
			<content:encoded><![CDATA[<p>Similar to a previous example, <a href="http://blog.flexexamples.com/2008/02/15/creating-a-simple-image-gallery-with-the-flex-horizontallist-control/">&#8220;Creating a simple image gallery with the Flex HorizontalList control&#8221;</a>, the following example shows how you can create a simple photo gallery in Flex using the TileList control, Image control, and the PopUpManager class.</p>
<p>Full code after the jump.</p>
<p><span id="more-551"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_itemClick_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/03/08/creating-a-simple-image-gallery-with-the-flex-tilelist-control/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Style&gt;
        global {
            modal-transparency: 0.9;
            modal-transparency-color: white;
            modal-transparency-blur: 9;
        }
    &lt;/mx:Style&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.effects.Resize;
            import mx.events.ResizeEvent;
            import mx.events.ListEvent;
            import mx.controls.Image;
            import mx.events.ItemClickEvent;
            import mx.managers.PopUpManager;

            private var img:Image;

            private function tileList_itemClick(evt:ListEvent):void {
                img = new Image();
                // img.width = 300;
                // img.height = 300;
                img.maintainAspectRatio = true;
                img.addEventListener(Event.COMPLETE, image_complete);
                img.addEventListener(ResizeEvent.RESIZE, image_resize);
                img.addEventListener(MouseEvent.CLICK, image_click);
                img.source = evt.itemRenderer.data.@fullImage;
                img.setStyle("addedEffect", image_addedEffect);
                img.setStyle("removedEffect", image_removedEffect);
                PopUpManager.addPopUp(img, this, true);
            }

            private function image_click(evt:MouseEvent):void {
                PopUpManager.removePopUp(evt.currentTarget as Image);
            }

            private function image_resize(evt:ResizeEvent):void {
                PopUpManager.centerPopUp(evt.currentTarget as Image);
            }

            private function image_complete(evt:Event):void {
                PopUpManager.centerPopUp(evt.currentTarget as Image);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:WipeDown id="image_addedEffect" startDelay="100" /&gt;

    &lt;mx:Parallel id="image_removedEffect"&gt;
        &lt;mx:Zoom /&gt;
        &lt;mx:Fade /&gt;
    &lt;/mx:Parallel&gt;

    &lt;mx:XML id="xml" source="gallery.xml" /&gt;
    &lt;mx:XMLListCollection id="xmlListColl" source="{xml.image}" /&gt;

    &lt;mx:TileList id="tileList"
            dataProvider="{xmlListColl}"
            itemRenderer="CustomItemRenderer"
            columnCount="4"
            columnWidth="125"
            rowCount="2"
            rowHeight="100"
            themeColor="haloSilver"
            verticalScrollPolicy="on"
            itemClick="tileList_itemClick(event);" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_itemClick_test/CustomItemRenderer.mxml">View CustomItemRenderer.mxml</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/03/08/creating-a-simple-image-gallery-with-the-flex-tilelist-control/ --&gt;
&lt;mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
        horizontalAlign="center"
        verticalAlign="middle"&gt;

    &lt;mx:Image source="{data.@thumbnailImage}" /&gt;

    &lt;mx:Label text="{data.@title}" /&gt;

&lt;/mx:VBox&gt;
</pre>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_itemClick_test/gallery.xml">View gallery.xml</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2008/03/08/creating-a-simple-image-gallery-with-the-flex-tilelist-control/ --&gt;
&lt;gallery&gt;
    &lt;image title="Flex"
        thumbnailImage="assets/fx_appicon-tn.gif"
        fullImage="assets/fx_appicon.jpg" /&gt;
    &lt;image title="Flash"
            thumbnailImage="assets/fl_appicon-tn.gif"
            fullImage="assets/fl_appicon.jpg" /&gt;
    &lt;image title="Illustrator"
            thumbnailImage="assets/ai_appicon-tn.gif"
            fullImage="assets/ai_appicon.jpg" /&gt;
    &lt;image title="Dreamweaver"
            thumbnailImage="assets/dw_appicon-tn.gif"
            fullImage="assets/dw_appicon.jpg" /&gt;
    &lt;image title="ColdFusion"
            thumbnailImage="assets/cf_appicon-tn.gif"
            fullImage="assets/cf_appicon.jpg" /&gt;
    &lt;image title="Flash Player"
            thumbnailImage="assets/fl_player_appicon-tn.gif"
            fullImage="assets/fl_player_appicon.jpg" /&gt;
    &lt;image title="Fireworks"
            thumbnailImage="assets/fw_appicon-tn.gif"
            fullImage="assets/fw_appicon.jpg" /&gt;
    &lt;image title="Lightroom"
            thumbnailImage="assets/lr_appicon-tn.gif"
            fullImage="assets/lr_appicon.jpg" /&gt;
    &lt;image title="Photoshop"
            thumbnailImage="assets/ps_appicon-tn.gif"
            fullImage="assets/ps_appicon.jpg" /&gt;
&lt;/gallery&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_itemClick_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/TileList_itemClick_test/bin/main.html" width="100%" height="500"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Creating a simple image gallery with the Flex TileList control on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/03/08/creating-a-simple-image-gallery-with-the-flex-tilelist-control/',contentID: 'post-551',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'addPopUp(),centerPopUp(),itemRenderer,removePopUp()',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/03/08/creating-a-simple-image-gallery-with-the-flex-tilelist-control/feed/</wfw:commentRss>
		<slash:comments>92</slash:comments>
		</item>
		<item>
		<title>Using the Flex TileList class&#8217;s new dataChangeEffect style in Flex 3</title>
		<link>http://blog.flexexamples.com/2007/09/28/using-the-flex-tilelist-classs-new-datachangeeffect-style-in-flex-3/</link>
		<comments>http://blog.flexexamples.com/2007/09/28/using-the-flex-tilelist-classs-new-datachangeeffect-style-in-flex-3/#comments</comments>
		<pubDate>Sat, 29 Sep 2007 01:59:54 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[DefaultTileListEffect]]></category>
		<category><![CDATA[TileList]]></category>
		<category><![CDATA[dataChangeEffect]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/28/using-the-flex-tilelist-classs-new-datachangeeffect-style-in-flex-3/</guid>
		<description><![CDATA[<p>The following example shows how you can add nice list effects when items are reordered in a TileList control.</p> <p>For more information on the new List and Data effects, see <a href="http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_List_and_Data_Effects">&#8220;Flex 3:Feature Introductions: List and Data Effects&#8221;</a>.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_dataChangeEffect_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/09/28/using-the-flex-tilelist-classs-new-datachangeeffect-style-in-flex-3/ --&#62; &#60;mx:Application [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can add nice list effects when items are reordered in a TileList control.</p>
<p>For more information on the new List and Data effects, see <a href="http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_List_and_Data_Effects">&#8220;Flex 3:Feature Introductions: List and Data Effects&#8221;</a>.</p>
<p>Full code after the jump.</p>
<p><span id="more-214"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_dataChangeEffect_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/09/28/using-the-flex-tilelist-classs-new-datachangeeffect-style-in-flex-3/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:DefaultTileListEffect id="myTileListEffect"
            fadeOutDuration="500"
            fadeInDuration="500"
            moveDuration="1500" /&gt;

    &lt;mx:ArrayCollection id="arrColl"&gt;
        &lt;mx:source&gt;
            &lt;mx:Array&gt;
                &lt;mx:Object source="assets/Accordion.png"
                        label="Accordion" /&gt;
                &lt;mx:Object source="assets/ApplicationControlBar.png"
                        label="ApplicationControlBar" /&gt;
                &lt;mx:Object source="assets/Box.png"
                        label="Box" /&gt;
                &lt;mx:Object source="assets/Button.png"
                        label="Button" /&gt;
                &lt;mx:Object source="assets/ButtonBar.png"
                        label="ButtonBar" /&gt;
                &lt;mx:Object source="assets/CheckBox.png"
                        label="CheckBox" /&gt;
                &lt;mx:Object source="assets/ColorPicker.png"
                        label="ColorPicker" /&gt;
                &lt;mx:Object source="assets/ComboBox.png"
                        label="ComboBox" /&gt;
                &lt;mx:Object source="assets/DataGrid.png"
                        label="DataGrid" /&gt;
                &lt;mx:Object source="assets/DateChooser.png"
                        label="DateChooser" /&gt;
                &lt;mx:Object source="assets/DateField.png"
                        label="DateField" /&gt;
                &lt;mx:Object source="assets/HorizontalList.png"
                        label="HorizontalList" /&gt;
                &lt;mx:Object source="assets/HRule.png"
                        label="HRule" /&gt;
            &lt;/mx:Array&gt;
        &lt;/mx:source&gt;
    &lt;/mx:ArrayCollection&gt;

    &lt;mx:TileList id="tileList"
            dataChangeEffect="{myTileListEffect}"
            dataProvider="{arrColl}"
            itemRenderer="TileListItemRenderer"
            dragEnabled="true"
            dropEnabled="true"
            dragMoveEnabled="true"
            columnWidth="100"
            rowHeight="100"
            width="100%"
            height="100%" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_dataChangeEffect_test/TileListItemRenderer.mxml">View TileListItemRenderer.mxml</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
        styleName="plain"
        verticalAlign="middle"
        horizontalAlign="center"
        horizontalScrollPolicy="off"
        verticalScrollPolicy="off"
        width="100%"
        height="100%"&gt;

    &lt;mx:Image source="{data.source}" /&gt;
    &lt;mx:Label text="{data.label}"
            truncateToFit="true"
            width="96" /&gt;

&lt;/mx:VBox&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/TileList_dataChangeEffect_test/bin/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/TileList_dataChangeEffect_test/bin/main.html" width="100%" height="400"></iframe></p>
<p class="alert">It seems that the <code>dataChangeEffect</code> effect was renamed to <code>itemsChangeEffect</code> in Flex 3 SDK build #184751 (Sat Oct 13 2007 &#8212; go to <a href="http://labs.adobe.com/technologies/flex/sdk/flex3sdk.html">Adobe Labs: Flex 3 Software Development Kit (SDK)</a> to download the latest nightly builds of the Flex 3 SDK). The previous example should still work as typed, although you&#8217;ll need to change the dataChangeEffect to itemsChangeEffect if you&#8217;re using a Flex 3 SDK build newer than October 13, 2007. For more information, see <a href="http://bugs.adobe.com/jira/browse/SDK-12729">&#8220;dataChangeEffect is declared as a Style, not an Effect, and is not triggered by the dataChange event&#8221;</a> in the <a href="http://bugs.adobe.com/flex/">public Flex bug base</a>.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Using the Flex TileList class\&#039;s new dataChangeEffect style in Flex 3 on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/09/28/using-the-flex-tilelist-classs-new-datachangeeffect-style-in-flex-3/',contentID: 'post-214',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'dataChangeEffect',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2007/09/28/using-the-flex-tilelist-classs-new-datachangeeffect-style-in-flex-3/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
	</channel>
</rss>

