<?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>Tink</title>
	<atom:link href="http://www.tink.ws/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tink.ws/blog</link>
	<description>Flash Platform development and personal rants.</description>
	<lastBuildDate>Fri, 27 Aug 2010 11:13:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Primitives</title>
		<link>http://www.tink.ws/blog/primitives/</link>
		<comments>http://www.tink.ws/blog/primitives/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 09:53:32 +0000</pubDate>
		<dc:creator>Tink</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flex 4.0]]></category>

		<guid isPermaLink="false">http://www.tink.ws/blog/?p=716</guid>
		<description><![CDATA[I know its been very quiet here of late, but I&#8217;ve been pretty active on our Google Code. A couple of weeks go someone who&#8217;d checked out the source left a post asking what Rect was for and how it differed from the Rect found in FXG. I thought it was about time I wrote [...]]]></description>
			<content:encoded><![CDATA[<p>I know its been very quiet here of late, but I&#8217;ve been pretty active on <a href="http://code.google.com/p/tink/">our Google Code</a>.</p>
<p>A couple of weeks go someone who&#8217;d checked out the source left a post asking what <code>Rect</code> was for and how it differed from the <code>Rect</code> found in FXG. I thought it was about time I wrote a post to cover it.</p>
<p>I was building a dashboard component for a client a couple of weeks back, much like the one found on the main <a href="http://www.bbc.co.uk/">BBC homepage</a>, or <a href="http://www.google.com/ig">iGoogle</a>, where you can add/removed and rearrange the position of the items shown. Much like those I wanted to show the user where the new item would be dropped with a rectangle that had a dashed stroke, and I wanted to be able to defined this in my skin, in MXML using a dropIndicator, to keep things nice and readable.</p>
<p>The problem is that Flash doesn&#8217;t support different stroke types, just different weights, and Adobe&#8217;s implementation of FXG also doesn&#8217;t allow for different stroke types. It&#8217;s true I could have drawn it with a complex <code>Path</code>, but then it wouldn&#8217;t have scaled correctly.</p>
<p>So I set about getting some primitive classes together where I could specify custom stoke types the result of which are below. You can also specify custom fill types, although I&#8217;m not sure they&#8217;ll be as useful as we already have <code>BitmapFill</code>. Using a the <code>lineBitmapStyle()</code> method for the stroke just didn&#8217;t cut it as the <code>BitmapData</code> needs to change depending on the direction of the stroke.</p>
<p>I&#8217;ve covered the primitives that are included in FXG, but the code is by no means complete and still needs some work to support missing drawing methods, and to fully implement some of the methods that are included.</p>
<p>I&#8217;ve also added 2 types of stroke, <code>SolidColorDash</code> (probably the most useful), and <code>SolidColorHatch</code>.</p>
<p>The classes <code>Dash</code> and <code>Hatch</code> can also be used in pure AS if required (props to <a href="http://www.senocular.com/flash/actionscript/?file=ActionScript_2.0/com/senocular/drawing/DashedLine.as">Senocular where the basis for these classes was lifted</a>).</p>
<p><span id="more-716"></span><div class="iframe-wrapper">
  <iframe src="http://www.tink.ws/examples/spark/PrimitiveExamples/" frameborder="0" style="height:1100px;width:440px;">Please upgrade your browser</iframe>
</div> (right click for source).</p>
<li><code>ws.tink.graphics.utils.EllipseUtil</code></li>
<li><code>ws.tink..graphics.utils.RectUtil</code></li>
<li><code>ws.tink.graphics.Dash</code></li>
<li><code>ws.tink..graphics.GraphicsCreator</code></li>
<li><code>ws.tink..graphics.Hatch</code></li>
<li><code>ws.tink..graphics.IGraphicsCreator</code></li>
<li><code>ws.tink.spark.graphics.SolidColorDash</code></li>
<li><code>ws.tink.spark.graphics.SolidColorHatch</code></li>
<li><code>ws.tink.spark.primatives.Cross</code></li>
<li><code>ws.tink.spark.primatives.Ellipse</code></li>
<li><code>ws.tink.spark.primatives.Line</code></li>
<li><code>ws.tink.spark.primatives.Path</code></li>
<li><code>ws.tink.spark.primatives.Rect</code></li>
]]></content:encoded>
			<wfw:commentRss>http://www.tink.ws/blog/primitives/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>London Flash Platform User Group June 2010</title>
		<link>http://www.tink.ws/blog/london-flash-platform-user-group-june-2010/</link>
		<comments>http://www.tink.ws/blog/london-flash-platform-user-group-june-2010/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 08:03:06 +0000</pubDate>
		<dc:creator>Tink</dc:creator>
				<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">http://www.tink.ws/blog/?p=709</guid>
		<description><![CDATA[My thanks go out to Matt Pollitt, Juan Delgado &#038; Richard Leggett for presenting at LFPUG last month. The videos can be found in the presentations section. First up this month, Alastair Dant from The Guardian will be doing a session titled &#8216;Digital Storytelling&#8217;, and following him will be David Fox with a session on [...]]]></description>
			<content:encoded><![CDATA[<p>My thanks go out to  <a href="http://www.mattpollitt.co.uk/">Matt Pollitt</a>, <a href="http://zarate.tv/en">Juan Delgado</a> &#038; <a href="http://richardleggett.co.uk/blog/">Richard Leggett</a> for presenting at LFPUG last month. The videos can be found in the <a href="http://www.lfpug.com/category/presentations/">presentations section</a>.</p>
<p>First up this month, <a href="http://www.guardian.co.uk/profile/alastair-dant">Alastair Dant</a> from The Guardian will be doing a session titled &#8216;Digital Storytelling&#8217;, and following him will be <a href="http://www.davefoxy.com/blog/">David Fox</a> with a session on &#8216;Flash Contracting&#8217;.</p>
<p><a href="http://www.lfpug.com/24th-june-2010-24062010/">London Flash Platform User Group 24th June 2010 (24/06/2010)</a></p>
<p>Sponsored by <a href="http://www.flashonthebeach.com/">Flash on the Beach</a> &#038; <a href="http://www.friendsofed.com/">friends of ED</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tink.ws/blog/london-flash-platform-user-group-june-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Player 10.1 and AIR 2 Released</title>
		<link>http://www.tink.ws/blog/flash-player-10-1-and-air-2-released/</link>
		<comments>http://www.tink.ws/blog/flash-player-10-1-and-air-2-released/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 22:38:40 +0000</pubDate>
		<dc:creator>Tink</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[ActionScript 3.0]]></category>

		<guid isPermaLink="false">http://www.tink.ws/blog/?p=700</guid>
		<description><![CDATA[Flash Player 10.1 Some of Flash Player 10.1 new features&#8230; Consistent development and delivery Global error handling Designed for mobility Expanded options for high quality media delivery Download Flash Player 10.1 AIR 2 Some of AIR 2 new features&#8230; Native Process API Open documents with the user’s default application Microphone data access Mass storage device [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Flash Player 10.1</strong></p>
<p>Some of Flash Player 10.1 new features&#8230;</p>
<li>Consistent development and delivery</li>
<li>Global error handling</li>
<li>Designed for mobility</li>
<li>Expanded options for high quality media delivery</li>
<p><a href="http://get.adobe.com/flashplayer/">Download Flash Player 10.1</a></p>
<p><strong>AIR 2</strong></p>
<p>Some of AIR 2 new features&#8230;</p>
<li>Native Process API</li>
<li>Open documents with the user’s default application</li>
<li>Microphone data access</li>
<li>Mass storage device detection</li>
<li>Updated, faster WebKit with enhanced support for HTML5 and CSS3</li>
<li>Multi-touch</li>
<li>New networking support including UDP and server sockets</li>
<li>Screen reader support</li>
<li>Reduced CPU usage on idle</li>
<li>Up to 30% reduction in memory usage without recompiling an application</li>
<p><a href="http://get.adobe.com/air/">Download AIR 2</a><br />
<a href="http://blogs.adobe.com/air/2010/06/introducing_air_2.html ">Official AIR 2 blog post by Arno Gourdol</a><br />
<a href="http://www.adobe.com/support/documentation/en/air/2/releasenotes_developers.html ">AIR 2 Release Notes (references the list of new features</a>)</p>
<p>Kudos to both teams and all involved!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tink.ws/blog/flash-player-10-1-and-air-2-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SemiCarouselLayout</title>
		<link>http://www.tink.ws/blog/semicarousellayout/</link>
		<comments>http://www.tink.ws/blog/semicarousellayout/#comments</comments>
		<pubDate>Fri, 21 May 2010 11:53:29 +0000</pubDate>
		<dc:creator>Tink</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flex 4.0]]></category>

		<guid isPermaLink="false">http://www.tink.ws/blog/?p=683</guid>
		<description><![CDATA[So it&#8217;s about time I punted out some layouts that I have hanging around, most of which are all based upon NavigatorLayoutBase. NavigatorLayoutBase can be considered a base layout class for use with our navigators (NavigatorGroup, Navigator, DataNavigatorGroup, DataNavigator, BorderDataNavigator), but can also be used with the standard Flex 4 containers/controls. I published an example [...]]]></description>
			<content:encoded><![CDATA[<p>So it&#8217;s about time I punted out some layouts that I have hanging around, most of which are all based upon <code>NavigatorLayoutBase</code>.</p>
<p><code>NavigatorLayoutBase</code> can be considered a base layout class for use with our navigators (<code>NavigatorGroup</code>, <code>Navigator</code>, <code>DataNavigatorGroup</code>, <code>DataNavigator</code>, <code>BorderDataNavigator</code>), but can also be used with the standard Flex 4 containers/controls. I published <a href="http://www.tink.ws/blog/flex-4-navigator/">an example of <code>StackLayout</code></a> some time ago which lays a container out as a <code>ViewStack</code> (i.e. a single child at a time), which is the default layout class for our navigators.</p>
<p>SemiCarouselLayout has a couple of classes in between NavigatorLayoutBase.</p>
<li><code>EasedNavigatorLayoutBase</code> &#8211; eases the layout from state to state.</li>
<li><code>PerspectiveNavigatorLayoutBase</code> &#8211; allows customization of the <code>PerspectiveProjection</code> applied to the layout target.</li>
<p><code>SemiCarouselLayout</code> lays the children out as if they in the front half of a carousel. Means its not a complete carousel it means the number of items can be infinite without affecting the number of visible items. There&#8217;s a few options for the layout which are easiest to describe with an example, so I&#8217;ve implement the layout with a couple of components below&#8230; (drag and drop is still to be implemented)</p>
<p><span id="more-683"></span><div class="iframe-wrapper">
  <iframe src="http://www.tink.ws/examples/spark/SemiCarouselLayoutExample/" frameborder="0" style="height:800px;width:440px;">Please upgrade your browser</iframe>
</div> (right click for source).</p>
<p>The source can be downloaded from our <a href="http://code.google.com/p/tink/">Google Code repository</a>, the following classes have been added.</p>
<li><code>ws.tink.spark.layouts.supportClasses.EasedNavigatorLayoutBase</code></li>
<li><code>ws.tink.spark.layouts.supportClasses.PerspectiveNavigatorLayoutBase </code></li>
<li><code>ws.tink.spark.layouts.supportClasses.SemiCarouselLayoutType</code></li>
<li><code>ws.tink.spark.layouts.SemiCarouselLayout</code></li>
<p>Note I&#8217;ve also moved around some of the navigator classes and their skins into more explanatory packages.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tink.ws/blog/semicarousellayout/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Flex 4: ExcludeSelectionList</title>
		<link>http://www.tink.ws/blog/flex-4-excludeselectionlist/</link>
		<comments>http://www.tink.ws/blog/flex-4-excludeselectionlist/#comments</comments>
		<pubDate>Fri, 14 May 2010 11:36:06 +0000</pubDate>
		<dc:creator>Tink</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flex 4.0]]></category>

		<guid isPermaLink="false">http://www.tink.ws/blog/?p=678</guid>
		<description><![CDATA[This component was in part inspired by some work Steven Shongrunden had done and a task that we had on a job. We didn&#8217;t want to have to change our data objects to hold a hard coded value to check whether the item should be selectable or not as in Steve&#8217;s version so I came [...]]]></description>
			<content:encoded><![CDATA[<p>This component was in part inspired by some work <a href="http://flexponential.com/2009/12/20/disable-selection-on-some-items-in-a-spark-list/">Steven Shongrunden</a> had done and a task that we had on a job.</p>
<p>We didn&#8217;t want to have to change our data objects to hold a hard coded value to check whether the item should be selectable or not as in Steve&#8217;s version so I came up with this.</p>
<p>There&#8217;s 3 ways you can specify to exclude an item from being is selectable.</p>
<li>You can add a type to exclude using <code>excludeType</code>, or a lost of types to exclude using <code>excludeTypes</code>.</li>
<li>You can add a index to exclude using <code>excludeIndex</code>, or a list of indices to exclude using <code>excludeIndices</code>.</li>
<li>You can specify a function that returns true or false on whether the item should be selectable using <code>excludeFunction</code>. The function takes 2 paremeters, the first an int which is the index of the item, and the second an Object which is the item itself.</li>
<p>The example below shows each of these being used, but you could also use a combination of the 3 methods above to exclude items.</p>
<p><span id="more-678"></span><div class="iframe-wrapper">
  <iframe src="http://www.tink.ws/examples/spark/ExcludeSelectionListExample/" frameborder="0" style="height:420px;width:440px;">Please upgrade your browser</iframe>
</div> (right click for source).</p>
<p>The source can be downloaded from our <a href="http://code.google.com/p/tink/">Google Code repository</a>, the following class has been added.</p>
<li><code>ws.tink.spark.controls.ExcludeSelectionList </code></li>
]]></content:encoded>
			<wfw:commentRss>http://www.tink.ws/blog/flex-4-excludeselectionlist/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>London Flash Platform User Group May 2010</title>
		<link>http://www.tink.ws/blog/london-flash-platform-user-group-may-2010/</link>
		<comments>http://www.tink.ws/blog/london-flash-platform-user-group-may-2010/#comments</comments>
		<pubDate>Wed, 12 May 2010 12:08:38 +0000</pubDate>
		<dc:creator>Tink</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.tink.ws/blog/?p=650</guid>
		<description><![CDATA[Huge thanks to both Jodie O’Rourke and Alex Rogers for their presentations at last months meeting. The videos, presentations and source files in the presentations section. First up this month, Matt Pollitt &#038; Juan Delgado with on Developing Flash Apps to Run 24/7, following him seasoned LFPUG speaker Richard Leggett is back with a session [...]]]></description>
			<content:encoded><![CDATA[<p>Huge thanks to both <a href="http://jodieorourke.com/">Jodie O’Rourke</a> and <a href="http://www.canvaspixels.com/">Alex Rogers</a> for their presentations at last months meeting. The videos, presentations and source files in the <a href="http://www.lfpug.com/category/presentations/">presentations section</a>.</p>
<p>First up this month, <a href="http://www.mattpollitt.co.uk/">Matt Pollitt</a> &#038; <a href="http://zarate.tv/en">Juan Delgado</a> with on Developing Flash Apps to Run 24/7, following him seasoned LFPUG speaker <a href="http://richardleggett.co.uk/blog/">Richard Leggett</a> is back with a session on the multiplying platform <a href="http://www.android.com/">Android</a>.</p>
<p><a href="http://www.lfpug.com/27th-may-2010-27052010/">London Flash Platform User Group 27th May 2010 (27/05/2010)</a></p>
<p>Sponsored by <a href="http://www.flashonthebeach.com/">Flash on the Beach</a> &#038; <a href="http://www.friendsofed.com/">friends of ED</a>.</p>
<p>We still have places left on our training course <a href="http://www.lfpug.com/the-beginners-guide-to-away3d-05-2010/">The Beginners Guide to Away 3D</a>.  To book a place on this course please contact <a href="mailto:training@lfpug.com?subject= The%20Beginner's%20Guide%20to%20Away3D">training AT lfpug.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tink.ws/blog/london-flash-platform-user-group-may-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>London Flash Platform User Group April 2010</title>
		<link>http://www.tink.ws/blog/london-flash-platform-user-group-april-2010/</link>
		<comments>http://www.tink.ws/blog/london-flash-platform-user-group-april-2010/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 10:07:01 +0000</pubDate>
		<dc:creator>Tink</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.tink.ws/blog/?p=644</guid>
		<description><![CDATA[As usual my thanks go out to Bartek Drozdz and Rob Bateman for their sessions last month. You can find the videos, presentations and source files in the presentations section. First up this month, Jodie O’Rourke with our first session at LFPUG on Adobe&#8217;s Open Source Media Framework, following him, with all the talk on [...]]]></description>
			<content:encoded><![CDATA[<p>As usual my thanks go out to <a href="http://www.everydayflash.com/">Bartek Drozdz</a> and <a href="http://www.infiniteturtles.co.uk/blog/">Rob Bateman</a> for their sessions last month. You can find the videos, presentations and source files in the <a href="http://www.lfpug.com/category/presentations/">presentations section</a>.</p>
<p>First up this month, <a href="http://jodieorourke.com/">Jodie O’Rourke</a> with our first session at LFPUG on Adobe&#8217;s <a href="http://www.opensourcemediaframework.com/">Open Source Media Framework</a>, following him, with all the talk on HTML5 and JavaScript we have <a href="http://www.canvaspixels.com/">Alex Rogers</a> presenting a session on the JavaScript framework <a href="http://mootools.net/">MooTools</a>.</p>
<p><a href="http://www.lfpug.com/29th-april-2010-29042010/">London Flash Platform User Group 29th April 2010 (29/04/2010)</a></p>
<p>Sponsored by <a href="http://www.friendsofed.com/">friends of ED</a>.</p>
<p>Also we still have places left on our training course <a href="http://www.lfpug.com/the-beginners-guide-to-away3d-05-2010/">The Beginners Guide to Away 3D</a>.  To book a place on this course please contact <a href="mailto:training@lfpug.com?subject= The%20Beginner's%20Guide%20to%20Away3D">training AT lfpug.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tink.ws/blog/london-flash-platform-user-group-april-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash on the Beach 2010</title>
		<link>http://www.tink.ws/blog/flash-on-the-beach-2010/</link>
		<comments>http://www.tink.ws/blog/flash-on-the-beach-2010/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 10:22:43 +0000</pubDate>
		<dc:creator>Tink</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.tink.ws/blog/?p=641</guid>
		<description><![CDATA[Just a quick post to info readers that Flash on the Beach tickets went on sale yesterday. Mega Early Bird and Ultra Early Bird tickets have already sold out. Don&#8217;t leave it too late for the Super Early Bird tickets!]]></description>
			<content:encoded><![CDATA[<p>Just a quick post to info readers that <a href="http://www.flashonthebeach.com/tickets/">Flash on the Beach tickets</a> went on sale yesterday.</p>
<p>Mega Early Bird and Ultra Early Bird tickets have already sold out. Don&#8217;t leave it too late for the Super Early Bird tickets!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tink.ws/blog/flash-on-the-beach-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex 4: Modules</title>
		<link>http://www.tink.ws/blog/flex-4-modules/</link>
		<comments>http://www.tink.ws/blog/flex-4-modules/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 09:02:35 +0000</pubDate>
		<dc:creator>Tink</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flex 4.0]]></category>

		<guid isPermaLink="false">http://www.tink.ws/blog/?p=616</guid>
		<description><![CDATA[If you&#8217;ve switch over to Flex 4 or in the process of switching you&#8217;ll notice Modules are missing from spark. We didn&#8217;t want to be stuck with the old ModuleLoader and Module based on VBox and LayoutContainer, so here&#8217;s our new versions based on Group. They should work pretty much the same as the mx [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve switch over to Flex 4 or in the process of switching you&#8217;ll notice Modules are missing from spark.</p>
<p>We didn&#8217;t want to be stuck with the old ModuleLoader and Module based on VBox and LayoutContainer, so here&#8217;s our new versions based on Group.</p>
<p>They should work pretty much the same as the mx versions with one change, there is now an additional <code>loadPolicy</code> property.</p>
<p>You can use this property to specify when the ModuleLoader should load its content. This was added to solve a problem I&#8217;d ran into a few times with the mx version. I&#8217;d have multiple ModuleLoaders in a ViewStack but they would all load immediately and at the same time. It didn&#8217;t make sense to load a Module unless the user actually wanted to view it.</p>
<p><code>ModuleLoader.loadPolicy</code> has 4 valid values</p>
<li>ModuleLoadPolicy.ADDED &#8211; load when the ModuleLoader is added to a displayList</li>
<li>ModuleLoadPolicy.ADDED_TO_STAGE- load when the ModuleLoader is added to the stage</li>
<li>ModuleLoadPolicy.IMMEDIATE- load immediately (the same as the mx ModuleLoader)</li>
<li>ModuleLoadPolicy.NONE- do not automatically load. <code>ModuleLoader.loadModule()</code> must be manually invoked to load the module</li>
<p><span id="more-616"></span><div class="iframe-wrapper">
  <iframe src="http://www.tink.ws/examples/spark/ModuleExample/" frameborder="0" style="height:420px;width:330px;">Please upgrade your browser</iframe>
</div> (right click for source).</p>
<p>The example above shows 4 instances of ModuleLoader in a <a href="http://www.tink.ws/blog/flex-4-navigator/">Navigator</a> (this means the loaders are only added to the stage when the index is displayed). Each ModuleLoader  has a different <code>loadPolicy</code> specified, Once a ModuleLoader has loaded its target a string representing the <code>loadPolicy</code> is added to a Label (note the ModuleLoader with a <code>loadPolicy</code> of &#8220;none&#8221; will never load its module unless you click on the Button to manually load it).</p>
<p>Thanks to <a href="http://blogs.adobe.com/dloverin/">Darrell</a> for his help with these.</p>
<p>The source can be downloaded from our <a href="http://code.google.com/p/tink/">Google Code repository</a>, the following classes have been added.</p>
<li><code>ws.tink.spark.modules.Module</code></li>
<li><code>ws.tink.spark.modules.ModuleLoader</code></li>
<li><code>ws.tink.spark.modules.ModuleLoadPolicy</code></li>
]]></content:encoded>
			<wfw:commentRss>http://www.tink.ws/blog/flex-4-modules/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Flex 4: UIComponent.depth</title>
		<link>http://www.tink.ws/blog/flex-4-uicomponent-depth/</link>
		<comments>http://www.tink.ws/blog/flex-4-uicomponent-depth/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 08:54:58 +0000</pubDate>
		<dc:creator>Tink</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flex 4.0]]></category>

		<guid isPermaLink="false">http://www.tink.ws/blog/?p=592</guid>
		<description><![CDATA[Do you remember using MovieClip.getDepth() &#038; MovieClip.swapDepths(target:Object) in AS 1.0 and 2.0. This was how we used to work with the z-sorting of MovieClips. Oh the joy! With the release of AS 3.0 depths went out the window and the display list was introduced, the index of the child denoting the z-sorting of the DisplayObjects. [...]]]></description>
			<content:encoded><![CDATA[<p>Do you remember using <code>MovieClip.getDepth()</code> &#038; <code>MovieClip.swapDepths(target:Object)</code> in AS 1.0 and 2.0. This was how we used to work with the z-sorting of MovieClips. Oh the joy!</p>
<p>With the release of AS 3.0 depths went out the window and the display list was introduced, the index of the child denoting the z-sorting of the DisplayObjects. This works fine but can be tricky to manage if the z-sorting is changing as you don&#8217;t have a continous way of accessing the same DisplayObject via an index, unless you push all the children in another Array to use as this reference.</p>
<p>Flex 3 also uses the index of items in the display list for layout purposes. For instance a VBox will render the child at the lowest index at the top, and the child at the highest index at the bottom. If for instance you had a negative verticalGap, you were constrained to the index with a higher index in the display list overlapping those at a lower index. If you change the index of a child to bring it to the front, its position in the VBox was also change.</p>
<p>Flex 4 re-introduced depths.</p>
<p><span id="more-592"></span>In Flex 4 UIComponent now has a <code>depth</code> property that is typed to an int. Changing this properties value will change the z-sorting of the items in the display list. Here&#8217;s an example&#8230;</p>
<div class="iframe-wrapper">
  <iframe src="http://www.tink.ws/examples/spark/DepthsExample/" frameborder="0" style="height:270px;width:420px;">Please upgrade your browser</iframe>
</div> (right click for source).</p>
<p>In the example above there is a HBox and a HGroup, each contain 4 SkinnableContainers that have the same properties. You&#8217;ll notice that a depth property has been set on each in the MXML. On click any of the 3 buttons the depth propery of the elements is also affected.</p>
<p><strong>Note that although we can change the depth of the elements in the mx container (or children actually means we are talking mx), the property has no effect at all, yet in the spark container it does, so whats going on here?</strong></p>
<p>With Flex 4 components you are no longer allowed to play with the display list or change a child index directly, instead you manage an extra list of IVisualElements, and internally the display list is managed for you (this means FXG can be managed in an efficient way). The order in which items are rendered in layouts is now based upon the order of the elements in the container, this means that internally the child indices can be swapped without having any effect on the order of the layout.</p>
<p>Yuo do this by setting the depth property of your child elements. The container then runs through the elements and changes their index in the display list (affecting the z-sorting), but because the layout uses the Array of elements for the layout order, the position of items in the layout aren&#8217;t affected.</p>
<p>This might not seem that useful at the moment as you probably rarely have negative gaps in your layouts, but when you start using 3D and setting z positions (most probably in layout classes) you&#8217;ll see how important and easy to use this new property is. Its also work noting that this depth property works find in a DataGroup, and the classes that use it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tink.ws/blog/flex-4-uicomponent-depth/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
