<?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>Tom Cornilliac &#187; Design</title>
	<atom:link href="http://www.tomcornilliac.com/category/design/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tomcornilliac.com</link>
	<description>Flex, AIR and Rich Internet Goodness</description>
	<lastBuildDate>Wed, 17 Jun 2009 15:40:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Applying Flash Filters to Flex Components</title>
		<link>http://www.tomcornilliac.com/2007/01/applying-flash-filters-to-flex-components/</link>
		<comments>http://www.tomcornilliac.com/2007/01/applying-flash-filters-to-flex-components/#comments</comments>
		<pubDate>Wed, 24 Jan 2007 16:52:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://tomcornilliac.netfirms.com/blog/?p=35</guid>
		<description><![CDATA[Lately I have been spending a lot of time considering Flex application design. I work in a really small shop (two of us) and we don&#8217;t have the luxury of a Designer on staff. As a result when it comes time to make our Flex applications look muy bonito it&#8217;s yours truly who has to [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I have been spending a lot of time considering Flex application design. I work in a really small shop (two of us) and we don&#8217;t have the luxury of a Designer on staff. As a result when it comes time to make our Flex applications look muy bonito it&#8217;s yours truly who has to put on the designer hat. Since&nbsp; I&#8217;m &#8220;design challenged&#8221; my options to date have been limited to CSS. Skinning is beyond my abilities as I don&#8217;t get Flash (timeline&#8230;.huh?). So the <a title="Flex Style Explorer" href="http://examples.adobe.com/flex2/consulting/styleexplorer/Flex2StyleExplorer.html">Flex Style Explorer</a> has been my designer buddy for awhile.</p>
<p> Yesterday while researching the depths of Flex CSS I discovered you can apply <a title="Flash Filters" href="http://livedocs.macromedia.com/flex/2/langref/flash/filters/package-detail.html">Flash Filters</a> to Flex Components. That&#8217;s what I want to explore in this post. Flash filters can not only make your application look better but they can also improve the user experience. You could us the Glow filter to provide user feedback based on mouse movements or you might use Blur filter to direct the user&#8217;s attention to an object on screen (similar to a modal Title Window but with more options). The <a title="flash.filters package" href="http://livedocs.macromedia.com/flex/2/langref/flash/filters/package-detail.html">flash.filters package</a> contains 13 filters you can use and combine to create some amazing styles without having to resort to skinning.</p>
<p> There are two methods for implementing Flash Filters in your Flex application.</p>
<ol>
<li>     You can create a new namespace linked to the flash.filters.* package, just     like you would a Flex Component.   </li>
<li>     You can apply filters through ActionScript
</li>
</ol>
<p> Both of these approaches have their own benefits and it&#8217;s really up to the developer/designer as to which method to use. Let&#8217;s look at the basic syntax of each method.</p>
<div class="typocode">
<div class="codetitle">Using Flash Filters in MXML</div>
<pre><code class="typocode_default "><notextile>&lt;mx:Application&gt;
    xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
    xmlns=&quot;*&quot;
    xmlns:flashFilter=&quot;flash.filters.*&quot;&amp;gt;

&lt;mx:TextArea&gt;
    width=&quot;150&quot; height=&quot;100&quot;
    cornerRadius=&quot;6&quot; text=&quot;Some text&quot;&amp;gt;
         &lt;mx:filters&gt;
             &lt;flashFilter:DropShadowFilter&gt;
                 inner=&quot;true&quot; distance=&quot;3&quot;
                 angle=&quot;120&quot; color=&quot;0x000000&quot;
                 alpha=&quot;0.4&quot; /&amp;gt;
            &lt;/flashFilter:DropShadowFilter&gt;
        &lt;/mx:filters&gt;
&lt;/mx:TextArea&gt;

&lt;/mx:Application&gt;</notextile></code></pre>
</div>
<div class="typocode">
<div class="codetitle">Using Flash Filters in ActionScript</div>
<pre><code class="typocode_default "><notextile>import flash.filters.*;

private function addGlow(event:MouseEvent):void
{
    var g:GlowFilter = new GlowFilter(0x006666, 0.65, 15, 15);
    var newFilters:Array = new Array();
    newFilters.push(g);
    event.currentTarget.filters = newFilters;
}</notextile></code></pre>
</div>
<p> As you can see Flash Filters are easy to implement and you don&#8217;t need any other software.</p>
<p><span style="font-weight: bold; text-decoration: underline;">Flash Filters Demonstrated<br />
</span><br/>I&#8217;ve created a very small <a href="/flex/flash_filters_demo/flashFilters.html" title="Flex app to demonstrate both of these techniques">Flex app to demonstrate both of these techniques</a> as well as give you something to look at. View Source is enabled so right + click and select view source to download the app and view the full source.</p>
<p><span style="font-weight: bold; text-decoration: underline;">Other Resources<br />
 </span>
<ul>
<li><a href="http://weblogs.macromedia.com/mc/" title="Adobe Consulting">Adobe Consulting</a> </li>
<li><a href="http://www.scalenine.com/" title="Flex Themes at scalenine.com">Flex Themes at scalenine.com</a></li>
<li><a href="http://livedocs.macromedia.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&amp;file=styles_069_27.html" title="Using Filters in Flex">Using Filters in Flex</a> (livedocs)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.tomcornilliac.com/2007/01/applying-flash-filters-to-flex-components/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
