<?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>creacog &#187; Flex Components</title>
	<atom:link href="http://blog.creacog.co.uk/category/adobe/flex/flex-components/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.creacog.co.uk</link>
	<description></description>
	<lastBuildDate>Thu, 19 Jan 2012 16:43:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Flex4.6 mobile  maxChars bug/problem and workaround</title>
		<link>http://blog.creacog.co.uk/2012/01/19/flex4-6-mobile-maxchars-bugproblem-and-workaround/</link>
		<comments>http://blog.creacog.co.uk/2012/01/19/flex4-6-mobile-maxchars-bugproblem-and-workaround/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 15:23:22 +0000</pubDate>
		<dc:creator>creacog</dc:creator>
				<category><![CDATA[Flex Components]]></category>
		<category><![CDATA[Spark components]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.creacog.co.uk/?p=633</guid>
		<description><![CDATA[Bug-note to self, and workaround while waiting for the bug-base to migrate from Adobe to Apache. I&#8217;m using in a Flex 4.6 mobile project and found that setting the maxChars property to 512 caused exeption: Main Thread (Suspended: ArgumentError: Error #2006: The supplied index is out of bounds.) flash.text::StageText/set viewPort [no source] spark.components.supportClasses::StyleableStageText/updateViewPort spark.components.supportClasses::StyleableStageText/commitProperties mx.core::UIComponent/validateProperties [...]]]></description>
			<content:encoded><![CDATA[<p>Bug-note to self, and workaround while waiting for the bug-base to migrate from Adobe to Apache.</p>
<p>I&#8217;m using  in a Flex 4.6 mobile project and found that setting the maxChars property to 512 caused exeption:</p>
<pre>Main Thread (Suspended: ArgumentError: Error #2006: The supplied index is out of bounds.)
flash.text::StageText/set viewPort [no source]
spark.components.supportClasses::StyleableStageText/updateViewPort
spark.components.supportClasses::StyleableStageText/commitProperties
mx.core::UIComponent/validateProperties
mx.managers::LayoutManager/validateProperties
mx.managers::LayoutManager/doPhasedInstantiation
mx.managers::LayoutManager/doPhasedInstantiationCallback</pre>
<p>However setting maxChars to something much smaller (e.g. 10) was fine. From experimentation, seems that the biggest number to which maxChars could be set without causing the problem was 481. I have no idea what that number relates to. Anyway the database field my TextInput corresponds to is 512 chars max so that&#8217;s the number I need.</p>
<p>The workaround:</p>
<p>Setting maxWidth on the TextInput seems to solve the problem. But rather than insert a constant I want the TextInput to flex to the width of it&#8217;s container, so the following seems to avoid the problem:</p>
<p>&nbsp;</p>
<p><code></p>
<blockquote><p>&lt;s:TextInput<br />
id        ="textInputId"<br />
maxWidth  ="{skinableContainerId.width}"<br />
maxChars  ="512" /&gt;</p></blockquote>
<p></code></p>
<p>&nbsp;</p>
<p>The future of Flex :</p>
<ul>
<li> <a href="http://incubator.apache.org/flex/">Apache Flex</a></li>
<li> <a href="http://blogs.apache.org/flex/">Apache Flex Blog</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.creacog.co.uk/2012/01/19/flex4-6-mobile-maxchars-bugproblem-and-workaround/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex 4 Spark VideoDisplay (measure, overlay, skin)</title>
		<link>http://blog.creacog.co.uk/2010/04/28/flex-4-spark-videodisplay-measure-overlay-skin/</link>
		<comments>http://blog.creacog.co.uk/2010/04/28/flex-4-spark-videodisplay-measure-overlay-skin/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 15:19:55 +0000</pubDate>
		<dc:creator>creacog</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Flex 4]]></category>
		<category><![CDATA[Flex Components]]></category>
		<category><![CDATA[Spark components]]></category>

		<guid isPermaLink="false">http://blog.creacog.co.uk/?p=430</guid>
		<description><![CDATA[In a previous article I described some of the steps required in Flex 3 in order to keep an overlay position in sync with a VideoDisplay component. With the release of Flex 4, VideoDisplay is one of the components to be updated. Via VideoPlayer, it gets a Spark makeover. Internally its core, or &#8216;view&#8217;, has [...]]]></description>
			<content:encoded><![CDATA[<p>In a <a title="overlaying VideoDisplay with constrained fluid layout" href="http://blog.creacog.co.uk/2009/09/21/overlaying-videodisplay-with-constrained-fluid-layout/">previous article</a> I described some of the steps required in Flex 3 in order to keep an overlay position in sync with a VideoDisplay component. With the release of Flex 4, <code>VideoDisplay</code> is one of the components to be updated. Via <code>VideoPlayer</code>, it gets a Spark makeover. Internally its core, or &#8216;view&#8217;, has been reimplemented using <a title="Open Source Media Framework" href="http://opensource.adobe.com/wiki/display/osmf/Open+Source+Media+Framework;jsessionid=CE1EDF88AF0033D9CB2C60674FB4BA6E" target="_blank">Open Source Media Framework</a>. For anyone wishing to keep an overlay in position over the view, however, the same key issue remains:</p>
<blockquote><p>None of the various width or height properties of the VideoDisplay component describe the width or height of the contained view.</p></blockquote>
<p>So, to get the properties of the view we need to delve deeper into VideoDisplay and use the mx_internal namespace. Even then, the ResizeEvent.RESIZE event is broadcast by VideoDisplay <strong>before</strong> it&#8217;s view dimensions (<strong>column B</strong>) have been updated to the new site.</p>
<p>In that previous article I observed that if, after each resize, I added an <code>Event.EXIT_FRAME</code> listener, I could guarantee that the VideoDisplay&#8217;s view had been sized by the time it was called. I observed that the same is true in Flex 4. However <code>EXIT_FRAME</code> didn&#8217;t feel like the right place to be doing this. So with a closer look at the component life cycle we can see that handling the <code>FlexEvent.UPDATE_COMPLETE</code> event is more appropriate. <strong>Column C </strong>shows the view&#8217;s width/height after <code>UPDATE_COMPLETE</code> has been broadcast. It colours red when a value  disagrees with column B (<code>RESIZE</code>). And so, it is column C that contains the values we want to use while managing our overlay.</p>
<div>
<object id="f4VideoDisplaySample1" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="470" height="300"><param name="allowFullScreen" value="true" /><param name="base" value="." /><param name="src" value="/wp-content/code-samples/Flex4SparkVideoDisplayOverlaySamples/bin-release/VideoDisplayF4Sample1.swf" /><!--[if !IE]>--><br />
<object width="470" height="300" base="." allowfullscreen="true" data="/wp-content/code-samples/Flex4SparkVideoDisplayOverlaySamples/bin-release/VideoDisplayF4Sample1.swf" type="application/x-shockwave-flash"><br />
<!--<![endif]--><br />
<img src="/wp-content/code-samples/Flex4SparkVideoDisplayOverlaySamples/sample1-snapshot.jpg" alt="Sample 1 : Comparing width/height after resize, then updateComplete" /><br />
<!--[if !IE]>--><br />
</object><br />
<!--<![endif]--><br />
</object></div>
<p><script type="text/javascript">// <![CDATA[
swfobject.registerObject("f4VideoDisplaySample1", "10.0.0", "/wp-content/swfobject_2_2/expressInstall.swf");
// ]]&gt;</script></p>
<p>Using this information and Flex 4&#8242;s new component and skinning architecture, we can build quick and simple to use video overlay component rather than messing about with external listeners and calculating positions as we did in the previous Flex 3 examples.</p>
<p>Reviewing what Flex 4 includes &#8216;out of the box&#8217;&#8230;</p>
<ul>
<li><code><a title="VideoDisplay reference" href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/VideoDisplay.html" target="_blank">VideoDisplay</a></code> : a non-skinable component that wraps an osmf &#8216;view&#8217;. It translates much of the osmf api and events to what we are accustomed to with Flex 3.</li>
<li><code><a title="VideoPlayer reference" href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/VideoPlayer.html" target="_blank">VideoPlayer</a></code> : A skinable component provides hooks for skin parts. A required part is an instance of VideoDisplay. The others are the buttons and controls we&#8217;d normally expect when giving the user control of the video.</li>
</ul>
<p>The VideoPlayer and it&#8217;s skin are overkill for this example, so we&#8217;ll create something far simpler&#8230;</p>
<ul>
<li><code>VideoDisplayOverlayContainer</code> : A container component who&#8217;s children will overlay a VideoDisplay</li>
<li><code>VideoDisplayOverlayContainerSkin</code> : A simple skin, providing the required videoDisplay skin part.</li>
</ul>
<p>This way, overlaying the video is as simple as giving the container some child components and a layout (defaults to basic layout). In the example that follows we overlay a label instance to each of the four corners and the centre of the view&#8230;</p>
<p><code></p>
<pre>&lt;components:VideoDisplayOverlayContainer
    id     ="videoDisplayContainer"
    source ="VideoSampleForFlex.mp4"
    width  ="100%"
    height ="100%" 	&gt;
    &lt;s:Label text="A" top="2" left="2" backgroundColor="0xffffff" backgroundAlpha="0.4" /&gt;
    &lt;s:Label text="B" top="2" right="2" backgroundColor="0xffffff" backgroundAlpha="0.4"  /&gt;
    &lt;s:Label text="C" bottom="2" left="2" backgroundColor="0xffffff" backgroundAlpha="0.4"  /&gt;
    &lt;s:Label text="D" bottom="2" right="2" backgroundColor="0xffffff" backgroundAlpha="0.4"  /&gt;
    &lt;s:Label text="O" verticalCenter="0" horizontalCenter="0" backgroundColor="0xffffff" backgroundAlpha="0.4"  /&gt;
&lt;/components:VideoDisplayOverlayContainer&gt;</pre>
<p></code></p>
<div>
<object id="f4VideoDisplaySample2" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="470" height="300"><param name="allowFullScreen" value="true" /><param name="base" value="." /><param name="src" value="/wp-content/code-samples/Flex4SparkVideoDisplayOverlaySamples/bin-release/VideoDisplayF4Sample2.swf" /><!--[if !IE]>--><br />
<object width="470" height="300" base="." allowfullscreen="true" data="/wp-content/code-samples/Flex4SparkVideoDisplayOverlaySamples/bin-release/VideoDisplayF4Sample2.swf" type="application/x-shockwave-flash"><br />
<!--<![endif]--><br />
<img src="/wp-content/code-samples/Flex4SparkVideoDisplayOverlaySamples/sample2-snapshot.jpg" alt="Sample 2 : Overlay container component"/><br />
<!--[if !IE]>--><br />
</object><br />
<!--<![endif]--><br />
</object></div>
<p><script type="text/javascript">// <![CDATA[
swfobject.registerObject("f4VideoDisplaySample2", "10.0.0", "/wp-content/swfobject_2_2/expressInstall.swf");
// ]]&gt;</script></p>
<p><a title="Sample 2 source" href="/wp-content/code-samples/Flex4SparkVideoDisplayOverlaySamples/bin-release/srcview/index2.html" target="_blank">View source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.creacog.co.uk/2010/04/28/flex-4-spark-videodisplay-measure-overlay-skin/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>overlaying VideoDisplay with constrained fluid layout</title>
		<link>http://blog.creacog.co.uk/2009/09/21/overlaying-videodisplay-with-constrained-fluid-layout/</link>
		<comments>http://blog.creacog.co.uk/2009/09/21/overlaying-videodisplay-with-constrained-fluid-layout/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 14:11:42 +0000</pubDate>
		<dc:creator>creacog</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex 2]]></category>
		<category><![CDATA[Flex 3]]></category>
		<category><![CDATA[Flex Components]]></category>

		<guid isPermaLink="false">http://blog.creacog.co.uk/?p=234</guid>
		<description><![CDATA[// UPDATE 28 April 2010 : This subject is revisited in relation to Flex 4 spark components, here. The problem: In Flex, how to overlay the video with something (e.g. a logo or caption) and keep the overlay relative to a corner of the actual video rectangle. Sounds like it should be a simple matter [...]]]></description>
			<content:encoded><![CDATA[<p><script src="/wp-content/swfobject_2_2/swfobject.js" type="text/javascript"></script> <script type="text/javascript">// <![CDATA[
swfobject.registerObject("videoDisplaySample1", "10.0.32", "/wp-content/swfobject_2_2/expressInstall.swf"); 	swfobject.registerObject("videoDisplaySample2", "10.0.32", "/wp-content/swfobject_2_2/expressInstall.swf"); 	swfobject.registerObject("videoDisplaySample3", "10.0.32", "/wp-content/swfobject_2_2/expressInstall.swf");
// ]]&gt;</script></p>
<p><strong><a title="Flex 4 Spark VideoDisplay (measure, overlay, skin)" href="http://blog.creacog.co.uk/2010/04/28/flex-4-spark-videodisplay-measure-overlay-skin/">UPDATE 28 April 2010</a></strong><a title="Flex 4 Spark VideoDisplay (measure, overlay, skin)" href="http://blog.creacog.co.uk/2010/04/28/flex-4-spark-videodisplay-measure-overlay-skin/"> : This subject is revisited in relation to Flex 4 spark components, here.</a></p>
<p>The problem: In Flex, how to overlay the video with something (e.g. a logo or caption) and keep the overlay relative to a corner of the actual video rectangle. Sounds like it should be a simple matter of creating a container and layering in the VideoDisplay instance and the over lay instance ? But&#8230;</p>
<p>In each of the following samples:</p>
<ul>
<li>We have an <a title="&lt;mx:Panel&gt;" href="http://livedocs.adobe.com/flex/3/langref/mx/containers/Panel.html" target="_blank">&lt;mx:Panel&gt;</a> which has been extended to be reposition-able (drag the title bar) and resizable (drag the lower-right corner).</li>
<li>The panel contains an <a title="&lt;mx:VideoDisplay&gt;" href="http://livedocs.adobe.com/flex/3/langref/mx/controls/VideoDisplay.html" target="_blank">&lt;mx:VideoDisplay&gt;</a> with 100% width and height</li>
<li>The panel also contains an overlay graphic &#8211; in this case using <a title="&lt;mx:Image&gt;" href="http://livedocs.adobe.com/flex/3/langref/mx/controls/Image.html" target="_blank">&lt;mx:Image&gt;</a></li>
<li>To view the samples you need to have Flash Player 10.0.32. or higher installed. You can get the latest Flash Player from here: <a title="Get Flash Player" href="http://get.adobe.com/flashplayer/" target="_blank">http://get.adobe.com/flashplayer/</a></li>
<li><a title="VideoDisplay samples source" href="/wp-content/code-samples/Flex3VideoDisplaySamples/srcview/0100-VideoDisplaySample.zip">The source-code for these samples can be downloaded</a></li>
<li>View source with a right-click on each of the samples</li>
</ul>
<h2>Video Display overlay Sample 1</h2>
<p>In our first sample we simply place our overlay image using attributes &#8216;top&#8217; and &#8216;right&#8217; to keep the overlay&#8217;s top-right corner to 10px in from the VideoDisplay top-right corner.</p>
<p><img src="/wp-content/code-samples/Flex3VideoDisplaySamples/snippets/sample1Snippet1.gif" alt="code-snippet" /></p>
<p>It basically looks fine until you hit the play button and start resizing the panel.</p>
<div>
<object id="videoDisplaySample1" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="300" height="300" ><param name="allowFullScreen" value="true" /><param name="base" value="." /><param name="src" value="/wp-content/code-samples/Flex3VideoDisplaySamples/VideoDisplaySample1.swf" /><!--[if !IE]>--><br />
<object width="300" height="300" base="." allowfullscreen="true" base="." data="/wp-content/code-samples/Flex3VideoDisplaySamples/VideoDisplaySample1.swf" type="application/x-shockwave-flash"><br />
<!--<![endif]--><br />
<!--[if !IE]>--><br />
</object><br />
<!--<![endif]--><br />
</object></div>
<div>
<p><a title="View source for sample 1" href="http://blog.creacog.co.uk/wp-content/code-samples/Flex3VideoDisplaySamples/srcview/index.html" target="_blank">View source</a></div>
<p>As you can see the actual video within the VideoDisplay is constrained by its rectangle and depending on the differing aspect ratios, there will either be black space at the sides or the top, and our overlay is faithfully anchored to top right corner of the VideoDisplay and looks odd unless the aspect ratios are equal.</p>
<p>So how to solve this?</p>
<p>Looking at <a title="&lt;mx:VideoDisplay&gt;" href="http://livedocs.adobe.com/flex/3/langref/mx/controls/VideoDisplay.html">the documentation for VideoDisplay</a>, there are many width and height properties to play with, however none of these relate to the current width and height or position of the contained video rectangle. You might think while looking at the documentation that the <a title="VideoDisplay.videoWidth" href="http://livedocs.adobe.com/flex/3/langref/mx/controls/VideoDisplay.html#videoWidth">videoWidth</a> and <a title="VideoDisplay.videoHeight" href="http://livedocs.adobe.com/flex/3/langref/mx/controls/VideoDisplay.html#videoHeight">videoHeight</a> properties might give the values we are after, but not so. They only return the &#8216;original&#8217; width and height of the loaded video.</p>
<p>Fortunately the OpenSource nature of the Flex SDK and the magic of, holding the command key on a Mac (control key on a PC) with the cursor over  the &lt;mx:VideoDisplay&gt; opening tag, then clicking it as it underlines,  (using in Flash Builder  or Flex Builder) will open the source for the VideoDisplay component within a new editor. Browsing through the code you will see at line 198:<br />
<code>mx_internal var videoPlayer:VideoPlayer = null;</code></p>
<p>It is this videoPlayer instance who&#8217;s properties we need to monitor to calculate our overlay&#8217;s position. The instance is not generally exposed through the VideoDisplay component&#8217;s api. Nor is it documented. However since it has been placed in the mx_internal name space, we can actually access it with namespace notation&#8230;</p>
<p><code>videoDisplay.mx_internal::videoPlayer.attribute</code></p>
<p>Where we replace &#8216;attribute&#8217; with the property name we are after, so the following would be of use to us&#8230;</p>
<p><code>videoDisplay.mx_internal::videoPlayer.x</code><br />
<code>videoDisplay.mx_internal::videoPlayer.y</code><br />
<code>videoDisplay.mx_internal::videoPlayer.width</code><br />
<code>videoDisplay.mx_internal::videoPlayer.height</code></p>
<h2 style="font-size: 1.5em;">Video Display overlay Sample 2</h2>
<p>In this second sample, we create a positionOverlay method and call it from the resize event of the VideoDisplay component. Within positionOverlay we use the name space notation to get the videoPlayer properties and use some basic maths to reposition our overlay based on the top-right corner of the videoPlayer instance rather than the videoDisplay instance.</p>
<p><img src="/wp-content/code-samples/Flex3VideoDisplaySamples/snippets/sample2Snippet1.gif" alt="code-snippet" /></p>
<p>Additionally we call positionOverlay from our applicationComplete handler to set the initial position.</p>
<div>
<object id="videoDisplaySample2" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="300" height="300"><param name="base" value="." /><param name="allowfullscreen" value="true" /><param name="src" value="/wp-content/code-samples/Flex3VideoDisplaySamples/VideoDisplaySample2.swf" /><!--[if !IE]>--><br />
<object width="300" height="300" base="." allowfullscreen="true" data="/wp-content/code-samples/Flex3VideoDisplaySamples/VideoDisplaySample2.swf" type="application/x-shockwave-flash"><br />
<!--<![endif]--><br />
<!--[if !IE]>--><br />
</object><br />
<!--<![endif]--><br />
</object></div>
<div>
<p><a title="View source for sample 2" href="http://blog.creacog.co.uk/wp-content/code-samples/Flex3VideoDisplaySamples/srcview/index2.html" target="_blank">View source</a></div>
<p>This basically seems ok, but play with it for a while and it is clear that something is wrong&#8230;</p>
<ul>
<li>Resizing slowly, seems ok</li>
<li>Resizing quickly, and there seems to be some lag in the position of the overlay</li>
<li>Release the resize handle while resizing quickly and the overlay can be left behind in completely the wrong place</li>
</ul>
<p>Having traced the videoPlayer instance properties from within the positionOverlay handler, it is apparent that while the videoDisplay properties are correct, the videoPlayer properties are as they were previously. i.e. as they were rather than as they shall be.</p>
<h2 style="font-size: 1.5em;">Video Display overlay Sample 3 &#8211; This one works properly!</h2>
<p>This is where Player version 10 comes in. It added <a title="Event.EXIT_FRAME" href="http://livedocs.adobe.com/flex/3/langref/flash/events/Event.html#EXIT_FRAME" target="_blank">Event.EXIT_FRAME</a>. (If your project targets a player older than 10, you will not see this event in your code assist.) If we use the exit frame event to defer the call to overlayPosition, we can then get measured values from videoPlayer and correctly position the overlay.</p>
<p>To do this I have created a new method positionOverlayOnExitFrame who&#8217;s job is to add an EXIT_FRAME listener who&#8217;s handler will be overlayPosition. The first job of which is to remove the listener, so that it only gets called once. By using a listener we need to change the interface of overlayPosition to accept an Event argument. But we are not interested in the event information and we still wish to call positionOverlay directly, so we have allowed the argument to have a null default.</p>
<p><img src="/wp-content/code-samples/Flex3VideoDisplaySamples/snippets/sample3Snippet1.gif" alt="code-snippet" /></p>
<p>Playing with the resize handle now, no-matter how quickly it is moved, shows no lag, and always drops in the correct place.</p>
<div>
<object id="videoDisplaySample3" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="300" height="300" ><param name="base" value="." /><param name="allowfullscreen" value="true" /><param name="src" value="/wp-content/code-samples/Flex3VideoDisplaySamples/VideoDisplaySample3.swf" /><!--[if !IE]>--><br />
<object width="300" height="300" base="." allowfullscreen="true" data="/wp-content/code-samples/Flex3VideoDisplaySamples/VideoDisplaySample3.swf" type="application/x-shockwave-flash"><br />
<!--<![endif]--><br />
<!--[if !IE]>--><br />
</object><br />
<!--<![endif]--><br />
</object></div>
<div>
<p><a title="View source for sample 3" href="http://blog.creacog.co.uk/wp-content/code-samples/Flex3VideoDisplaySamples/srcview/index3.html" target="_blank">View source</a></div>
<p>Finally, just to re-iterate, <a title="download source code : 0100-VideoDisplaySample.zip" href="/wp-content/code-samples/Flex3VideoDisplaySamples/srcview/0100-VideoDisplaySample.zip">source code zip for these examples is here</a>.</p>
<p>Note: These samples were built against Flex SDK version 3.4.</p>
<p>Note: I haven&#8217;t found any official documentation relating to when Event.EXIT_FRAME arrived in the player runtime. The <a title="Event.EXIT_FRAME" href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/events/Event.html#EXIT_FRAME" target="_blank">Flash CS4 documentation for Event.EXIT_FRAME</a> indicates player 9. However unless you target player 10 in Flex/Flash Builder, you will get compile errors. If anyone has accurate references, please post to the comments &#8211; thanks.</p>
<p>Note: When you look at the <a title="View source code" href="http://blog.creacog.co.uk/wp-content/code-samples/Flex3VideoDisplaySamples/srcview/index3.html" target="_blank">source view</a>, it appears ragged. This is because in creating the HTML, Flash builder simply converts tab characters to four space characters. Clearly not every tab in my code actually represents 4 characters and therefore what should look like neat columns becomes ragged. I have filed a bug/enhancement request. If you too would like this fixed, feel free to add your vote to <a title="FB-23060" href="https://bugs.adobe.com/jira/browse/FB-23060" target="_blank">FB-23060</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.creacog.co.uk/2009/09/21/overlaying-videodisplay-with-constrained-fluid-layout/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>finding information on Flex 3 component lifecycle</title>
		<link>http://blog.creacog.co.uk/2009/05/21/finding-information-on-flex-3-component-lifecycle/</link>
		<comments>http://blog.creacog.co.uk/2009/05/21/finding-information-on-flex-3-component-lifecycle/#comments</comments>
		<pubDate>Thu, 21 May 2009 11:40:26 +0000</pubDate>
		<dc:creator>creacog</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex 3]]></category>
		<category><![CDATA[Flex Components]]></category>

		<guid isPermaLink="false">http://blog.creacog.co.uk/?p=210</guid>
		<description><![CDATA[Quickly creating re-usable components based on others, augmented with additional ActionScript behaviour using MXML is as simple as can be. However, to create a component from scratch using ActionScript requires a lot of detailed knowledge of how the Flex framework works and the component life-cycle in particular. The Flex documentation attempts to describe the lifecycle, but [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-top: 1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px;">Quickly creating re-usable components based on others, augmented with additional ActionScript behaviour using MXML is as simple as can be. However, to create a component from scratch using ActionScript requires a lot of detailed knowledge of how the Flex framework works and the component life-cycle in particular.</p>
<p>The <a title="About creating advanced components" href="http://livedocs.adobe.com/flex/3/html/help.html?content=ascomponents_advanced_2.html">Flex documentation attempts to describe the lifecycle<img id="snap_com_shot_link_icon" class="snap_preview_icon" src="http://i.ixnp.com/images/v3.84/t.gif" alt="" /><img id="snap_com_shot_link_icon" class="snap_preview_icon" src="http://i.ixnp.com/images/v3.85/t.gif" alt="" /></a>, but can leave the developer with lots of unanswered questions. When I got more involved in developing components I found <a href="http://www.amazon.co.uk/gp/product/0596516215?ie=UTF8&amp;tag=creacogtheblo-21&amp;linkCode=as2&amp;camp=1634&amp;creative=6738&amp;creativeASIN=0596516215">chapter 19 of Programming Flex 3<img id="snap_com_shot_link_icon" class="snap_preview_icon" src="http://i.ixnp.com/images/v3.84/t.gif" alt="" /><img id="snap_com_shot_link_icon" class="snap_preview_icon" src="http://i.ixnp.com/images/v3.85/t.gif" alt="" /></a><img src="http://www.assoc-amazon.co.uk/e/ir?t=creacogtheblo-21&amp;l=as2&amp;o=2&amp;a=0596516215" border="0" alt="" width="1" height="1" /> good for filling in the gaps.</p>
<p>This week a new and free paper has been published by DevelopmentArc that also explores the component life-cycle and the application life-cycle. A very well worth while read….</p>
<p><a title="Understanding the Adobe Flex® 3 Component and Framework Lifecycle" href="http://www.developmentarc.com/site/articles/">Understanding the Adobe Flex® 3 Component and Framework Lifecycle<img id="snap_com_shot_link_icon" class="snap_preview_icon" src="http://i.ixnp.com/images/v3.84/t.gif" alt="" /><img id="snap_com_shot_link_icon" class="snap_preview_icon" src="http://i.ixnp.com/images/v3.85/t.gif" alt="" /></a></p>
<p>Feel free to post links to other compent lifecycle resrouces in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.creacog.co.uk/2009/05/21/finding-information-on-flex-3-component-lifecycle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SimpleOscilloscope : filter update</title>
		<link>http://blog.creacog.co.uk/2009/03/15/simpleoscilloscope-filter-update/</link>
		<comments>http://blog.creacog.co.uk/2009/03/15/simpleoscilloscope-filter-update/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 23:59:16 +0000</pubDate>
		<dc:creator>creacog</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex Builder]]></category>
		<category><![CDATA[Flex Components]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://blog.creacog.co.uk/?p=191</guid>
		<description><![CDATA[My SimpleOscilloscope component described in an earlier post has now been updated to include a few filters controllable through setting styles. Of course like any other Flex component, it can have additional filtering applied in the normal way. I just felt like including these : alphaDecay, redMultiplier, greenMultiplier, blueMultiplier, blurX, blurY, scrollX, scrollY. As ever, [...]]]></description>
			<content:encoded><![CDATA[<p>My SimpleOscilloscope component <a title="SimpleOscilloscope : my first opensource Flex component" href="http://blog.creacog.co.uk/2009/03/09/simpleoscilloscope-my-first-opensource-flex-component/">described in an earlier post</a> has now been updated to include a few filters controllable through setting styles. Of course like any other Flex component, it can have additional filtering applied in the normal way. I just felt like including these : alphaDecay, redMultiplier, greenMultiplier, blueMultiplier, blurX, blurY, scrollX, scrollY.</p>
<p>As ever, the project is <a title="ccglib on google code" href="http://code.google.com/p/ccglib/">on google code</a>, and <a title="SimleOscilloscope Test Bed" href="http://creative-cognition.co.uk/ccglibTestBeds/SimpleOscilloscopeTestBed/">the test bed is here</a>.</p>
<p><img class="alignleft size-medium wp-image-192" src="http://blog.creacog.co.uk/wp-content/uploads/2009/03/oscilloscope-r7-300x219.jpg" alt="SimpleOscilloscope snapshot - with filters" width="300" height="219" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.creacog.co.uk/2009/03/15/simpleoscilloscope-filter-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SimpleOscilloscope : my first opensource Flex component</title>
		<link>http://blog.creacog.co.uk/2009/03/09/simpleoscilloscope-my-first-opensource-flex-component/</link>
		<comments>http://blog.creacog.co.uk/2009/03/09/simpleoscilloscope-my-first-opensource-flex-component/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 11:44:52 +0000</pubDate>
		<dc:creator>creacog</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex Builder]]></category>
		<category><![CDATA[Flex Components]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[ccglib]]></category>
		<category><![CDATA[Components]]></category>
		<category><![CDATA[sound]]></category>

		<guid isPermaLink="false">http://blog.creacog.co.uk/?p=174</guid>
		<description><![CDATA[In the majority of my projects to-date, I am the sole developer on the project team. I was feeling the need to get into writing Flex components to a level that they could be distributed. Essentially making sure I use meta tags correctly and adding appropriate asdoc comments allowing other Flex developers to easily include [...]]]></description>
			<content:encoded><![CDATA[<p>In the majority of my projects to-date, I am the sole developer on the project team. I was feeling the need to get into writing Flex components to a level that they could be distributed. Essentially making sure I use meta tags correctly and adding appropriate asdoc comments allowing other Flex developers to easily include the component as they would any other from the Flex SDK.</p>
<p><a href="http://creative-cognition.co.uk/ccglibTestBeds/SimpleOscilloscopeTestBed/"><img class="size-full wp-image-175 alignleft" title="SimpleOscilloscope snapshot" src="http://blog.creacog.co.uk/wp-content/uploads/2009/03/thumbsimpleoscilloscope.gif" alt="SimpleOscilloscope snapshot" width="200" height="150" /></a></p>
<p>So, ccglib is an <a title="MIT License" href="http://www.opensource.org/licenses/mit-license.php" target="_blank">MIT license</a> OpenSource project hosted on google code through which i plan to release a number of components. The first component released is <a title="SimpleOscilloscope" href="http://code.google.com/p/ccglib/wiki/SimpleOscilloscope">SimpleOscilloscope</a>, which plots the currently playing sound-wave. Designed to be easily sized, coloured and positioned through application of styles.</p>
<ul style="clear:both;">
<li><a href="http://code.google.com/p/ccglib/">the ccglib project on google code</a> (get <a href="http://code.google.com/p/ccglib/source/checkout">the source</a>, or <a href="http://code.google.com/p/ccglib/downloads/list">download the swc library</a>)</li>
<li><a href="http://creative-cognition.co.uk/ccglibTestBeds/SimpleOscilloscopeTestBed/">the test-bed demonstrating SimpleOscilloscope</a> (view source enabled)</li>
<li><a href="http://www.creative-cognition.co.uk/caseStudies-ccglib.html">Case-study added to my corporate site</a></li>
<li><a href="http://www.gotoandlearn.com/play?id=62" target="_blank">gotoandlearn</a> : great tutorials on how to get started creating your own sound-wave visualisations with ActionScript</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.creacog.co.uk/2009/03/09/simpleoscilloscope-my-first-opensource-flex-component/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

