<?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; blurX</title>
	<atom:link href="http://blog.flexexamples.com/tag/blurx/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>Using the new filter effects in Flex Gumbo</title>
		<link>http://blog.flexexamples.com/2008/08/14/using-the-new-filter-effects-in-flex-gumbo/</link>
		<comments>http://blog.flexexamples.com/2008/08/14/using-the-new-filter-effects-in-flex-gumbo/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 06:46:45 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta]]></category>
		<category><![CDATA[BlurFilter]]></category>
		<category><![CDATA[Filters]]></category>
		<category><![CDATA[blurX]]></category>
		<category><![CDATA[blurY]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[quality]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/08/14/using-the-new-filter-effects-in-flex-gumbo/</guid>
		<description><![CDATA[<p>The following example shows how you can use the new Flex Gumbo filter effects from the flex.filters.* package. These new filters allow you to modify the filter&#8217;s properties at runtime without needing to recreate and reapply the filter to the display object.</p> <p>Full code after the jump.</p> <p></p> <p class="alert">To use the following code, you [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can use the new Flex Gumbo filter effects from the flex.filters.* package. These new filters allow you to modify the filter&#8217;s properties at runtime without needing to recreate and reapply the filter to the display object.</p>
<p>Full code after the jump.</p>
<p><span id="more-746"></span></p>
<p class="alert">To use the following code, you must have Flash Player 10 and a Flex Gumbo SDK installed in your Flex Builder 3. For more information on downloading and installing the Gumbo SDK into Flex Builder 3, see <a href="http://blog.flexexamples.com/2008/08/02/using-the-beta-gumbo-sdk-in-flex-builder-3/">&#8220;Using the beta Gumbo SDK in Flex Builder 3&#8243;</a>.</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Gumbo_Filters_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/14/using-the-new-filter-effects-in-flex-gumbo/ --&gt;
&lt;Application name="Gumbo_Filters_test"
        xmlns="http://ns.adobe.com/mxml/2009"
        xmlns:mx="library:adobe/flex/halo"&gt;
    &lt;layout&gt;
        &lt;BasicLayout /&gt;
    &lt;/layout&gt;

    &lt;mx:Form&gt;
        &lt;mx:FormItem label="blurX:"&gt;
            &lt;mx:HSlider id="blurXSlider"
                    minimum="0"
                    maximum="10"
                    value="4"
                    snapInterval="1"
                    tickInterval="1"
                    liveDragging="true" /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="blurY:"&gt;
            &lt;mx:HSlider id="blurYSlider"
                    minimum="0"
                    maximum="10"
                    value="4"
                    snapInterval="1"
                    tickInterval="1"
                    liveDragging="true" /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="quality:"&gt;
            &lt;mx:HSlider id="qualitySlider"
                    minimum="0"
                    maximum="10"
                    value="1"
                    snapInterval="1"
                    tickInterval="1"
                    liveDragging="true" /&gt;
        &lt;/mx:FormItem&gt;
    &lt;/mx:Form&gt;

    &lt;BitmapGraphic id="img"
            source="@Embed('flex_logo.jpg')"
            horizontalCenter="0"
            verticalCenter="0"&gt;
        &lt;filters&gt;
            &lt;BlurFilter id="blurFilter"
                    blurX="{blurXSlider.value}"
                    blurY="{blurYSlider.value}"
                    quality="{qualitySlider.value}" /&gt;
        &lt;/filters&gt;
    &lt;/BitmapGraphic&gt;

&lt;/Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/Gumbo_Filters_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/Gumbo_Filters_test/bin/main.html" width="100%" height="250"></iframe></p>
<p>You can also set the Gumbo BlurFilter filter&#8217;s <code>blurX</code>, <code>blurY</code>, and <code>quality</code> properties using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Gumbo_Filters_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/14/using-the-new-filter-effects-in-flex-gumbo/ --&gt;
&lt;Application name="Gumbo_Filters_test"
        xmlns="http://ns.adobe.com/mxml/2009"
        xmlns:mx="library:adobe/flex/halo"&gt;
    &lt;layout&gt;
        &lt;BasicLayout /&gt;
    &lt;/layout&gt;

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

            private function blurXSlider_change(evt:SliderEvent):void {
                blurFilter.blurX = evt.value;
            }

            private function blurYSlider_change(evt:SliderEvent):void {
                blurFilter.blurY = evt.value;
            }

            private function qualitySlider_change(evt:SliderEvent):void {
                blurFilter.quality = evt.value;
            }
        ]]&gt;
    &lt;/Script&gt;

    &lt;mx:Form&gt;
        &lt;mx:FormItem label="blurX:"&gt;
            &lt;mx:HSlider id="blurXSlider"
                    minimum="0"
                    maximum="10"
                    value="4"
                    snapInterval="1"
                    tickInterval="1"
                    liveDragging="true"
                    change="blurXSlider_change(event);" /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="blurY:"&gt;
            &lt;mx:HSlider id="blurYSlider"
                    minimum="0"
                    maximum="10"
                    value="4"
                    snapInterval="1"
                    tickInterval="1"
                    liveDragging="true"
                    change="blurYSlider_change(event);" /&gt;
        &lt;/mx:FormItem&gt;
        &lt;mx:FormItem label="quality:"&gt;
            &lt;mx:HSlider id="qualitySlider"
                    minimum="0"
                    maximum="10"
                    value="1"
                    snapInterval="1"
                    tickInterval="1"
                    liveDragging="true"
                    change="qualitySlider_change(event);" /&gt;
        &lt;/mx:FormItem&gt;
    &lt;/mx:Form&gt;

    &lt;BitmapGraphic id="img"
            source="@Embed('flex_logo.jpg')"
            horizontalCenter="0"
            verticalCenter="0"&gt;
        &lt;filters&gt;
            &lt;BlurFilter id="blurFilter" /&gt;
        &lt;/filters&gt;
    &lt;/BitmapGraphic&gt;

&lt;/Application&gt;
</pre>
<p>For more information, see <a href="http://livedocs.adobe.com/flex/gumbo/langref/">http://livedocs.adobe.com/flex/gumbo/langref/</a>.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Using the new filter effects in Flex Gumbo on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/08/14/using-the-new-filter-effects-in-flex-gumbo/',contentID: 'post-746',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'blurX,blurY,Gumbo,quality',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/14/using-the-new-filter-effects-in-flex-gumbo/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

