<?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; x</title>
	<atom:link href="http://blog.flexexamples.com/tag/x/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>Setting the origin X and Y coordinate for a linear gradient stroke in Flex Gumbo</title>
		<link>http://blog.flexexamples.com/2009/01/04/setting-the-origin-x-and-y-coordinate-for-a-linear-gradient-stroke-in-flex-gumbo/</link>
		<comments>http://blog.flexexamples.com/2009/01/04/setting-the-origin-x-and-y-coordinate-for-a-linear-gradient-stroke-in-flex-gumbo/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 07:42:11 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta]]></category>
		<category><![CDATA[FXG]]></category>
		<category><![CDATA[GradientEntry]]></category>
		<category><![CDATA[LinearGradientStroke]]></category>
		<category><![CDATA[Rect]]></category>
		<category><![CDATA[entries]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[rotation]]></category>
		<category><![CDATA[stroke]]></category>
		<category><![CDATA[x]]></category>
		<category><![CDATA[y]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2009/01/04/setting-the-origin-x-and-y-coordinate-for-a-linear-gradient-stroke-in-flex-gumbo/</guid>
		<description><![CDATA[<p>The following example shows how you can set the origin X and Y coordinate for a linear gradient stroke in Flex Gumbo by setting the x and y properties on the LinearGradientStroke object.</p> <p>Full code after the jump.</p> <p></p> <p class="alert">To use the following code, you must have Flash Player 10 and a Flex Gumbo [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the origin X and Y coordinate for a linear gradient stroke in Flex Gumbo by setting the <code>x</code> and <code>y</code> properties on the LinearGradientStroke object.</p>
<p>Full code after the jump.</p>
<p><span id="more-923"></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/LinearGradientStroke_x_test/bin/srcview/source/main_4407.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2009/01/04/setting-the-origin-x-and-y-coordinate-for-a-linear-gradient-stroke-in-flex-gumbo/ --&gt;
&lt;Application name="LinearGradientStroke_x_test"
        xmlns="http://ns.adobe.com/mxml/2009"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;ApplicationControlBar dock="true"&gt;
        &lt;Form styleName="plain"&gt;
            &lt;FormItem label="x:"&gt;
                &lt;HSlider id="xSlider"
                        minimum="-100"
                        maximum="100"
                        value="0"
                        snapInterval="1"
                        tickInterval="25"
                        liveDragging="true" /&gt;
            &lt;/FormItem&gt;
            &lt;FormItem label="y:"&gt;
                &lt;HSlider id="ySlider"
                        minimum="-100"
                        maximum="100"
                        value="0"
                        snapInterval="1"
                        tickInterval="25"
                        liveDragging="true" /&gt;
            &lt;/FormItem&gt;
            &lt;FormItem label="rotation:"&gt;
                &lt;HSlider id="rotationSlider"
                        minimum="-360"
                        maximum="360"
                        value="0"
                        snapInterval="1"
                        tickInterval="45"
                        liveDragging="true" /&gt;
            &lt;/FormItem&gt;
        &lt;/Form&gt;
    &lt;/ApplicationControlBar&gt;

    &lt;Graphic&gt;
        &lt;Rect id="rect" width="300" height="200"&gt;
            &lt;stroke&gt;
                &lt;LinearGradientStroke id="linearGrad"
                        x="{xSlider.value}"
                        y="{ySlider.value}"
                        rotation="{rotationSlider.value}"
                        weight="5"&gt;
                    &lt;GradientEntry color="red" /&gt;
                    &lt;GradientEntry color="white" /&gt;
                    &lt;GradientEntry color="blue" /&gt;
                &lt;/LinearGradientStroke&gt;
            &lt;/stroke&gt;
        &lt;/Rect&gt;
    &lt;/Graphic&gt;

&lt;/Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/LinearGradientStroke_x_test/bin/srcview/">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/LinearGradientStroke_x_test/bin/main_4407.html" width="100%" height="350"></iframe></p>
<p>You can also set the LinearGradientStroke object&#8217;s <code>x</code>, <code>y</code>, and <code>rotation</code> properties using ActionScript, as seen in the following example:</p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/LinearGradientStroke_x_test/bin/srcview/source/main2_4407.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2009/01/04/setting-the-origin-x-and-y-coordinate-for-a-linear-gradient-stroke-in-flex-gumbo/ --&gt;
&lt;Application name="LinearGradientStroke_x_test"
        xmlns="http://ns.adobe.com/mxml/2009"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

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

            private function xSlider_change(evt:SliderEvent):void {
                linearGrad.x = evt.value;
            }

            private function ySlider_change(evt:SliderEvent):void {
                linearGrad.y = evt.value;
            }

            private function rotationSlider_change(evt:SliderEvent):void {
                linearGrad.rotation = evt.value;
            }
        ]]&gt;
    &lt;/Script&gt;

    &lt;ApplicationControlBar dock="true"&gt;
        &lt;Form styleName="plain"&gt;
            &lt;FormItem label="x:"&gt;
                &lt;HSlider id="xSlider"
                        minimum="-100"
                        maximum="100"
                        value="0"
                        snapInterval="1"
                        tickInterval="25"
                        liveDragging="true"
                        change="xSlider_change(event);" /&gt;
            &lt;/FormItem&gt;
            &lt;FormItem label="y:"&gt;
                &lt;HSlider id="ySlider"
                        minimum="-100"
                        maximum="100"
                        value="0"
                        snapInterval="1"
                        tickInterval="25"
                        liveDragging="true"
                        change="ySlider_change(event);" /&gt;
            &lt;/FormItem&gt;
            &lt;FormItem label="rotation:"&gt;
                &lt;HSlider id="rotationSlider"
                        minimum="-360"
                        maximum="360"
                        value="0"
                        snapInterval="1"
                        tickInterval="45"
                        liveDragging="true"
                        change="rotationSlider_change(event);" /&gt;
            &lt;/FormItem&gt;
        &lt;/Form&gt;
    &lt;/ApplicationControlBar&gt;

    &lt;Graphic&gt;
        &lt;Rect id="rect" width="300" height="200"&gt;
            &lt;stroke&gt;
                &lt;LinearGradientStroke id="linearGrad"
                        x="{xSlider.value}"
                        y="{ySlider.value}"
                        rotation="{rotationSlider.value}"
                        weight="5"&gt;
                    &lt;GradientEntry color="red" /&gt;
                    &lt;GradientEntry color="white" /&gt;
                    &lt;GradientEntry color="blue" /&gt;
                &lt;/LinearGradientStroke&gt;
            &lt;/stroke&gt;
        &lt;/Rect&gt;
    &lt;/Graphic&gt;

&lt;/Application&gt;
</pre>
<p class="alert">This entry is based on a beta version of the Flex Gumbo SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex Gumbo SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the origin X and Y coordinate for a linear gradient stroke in Flex Gumbo on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/01/04/setting-the-origin-x-and-y-coordinate-for-a-linear-gradient-stroke-in-flex-gumbo/',contentID: 'post-923',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'entries,Gumbo,rotation,stroke,x,y',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/2009/01/04/setting-the-origin-x-and-y-coordinate-for-a-linear-gradient-stroke-in-flex-gumbo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting the origin X and Y coordinate for a radial gradient fill in Flex Gumbo</title>
		<link>http://blog.flexexamples.com/2008/12/24/setting-the-origin-x-and-y-coordinate-for-a-radial-gradient-fill-in-flex-gumbo/</link>
		<comments>http://blog.flexexamples.com/2008/12/24/setting-the-origin-x-and-y-coordinate-for-a-radial-gradient-fill-in-flex-gumbo/#comments</comments>
		<pubDate>Thu, 25 Dec 2008 04:39:35 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta]]></category>
		<category><![CDATA[FXG]]></category>
		<category><![CDATA[GradientEntry]]></category>
		<category><![CDATA[RadialGradient]]></category>
		<category><![CDATA[Rect]]></category>
		<category><![CDATA[fill]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[x]]></category>
		<category><![CDATA[y]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/12/24/setting-the-origin-x-and-y-coordinate-for-a-radial-gradient-fill-in-flex-gumbo/</guid>
		<description><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/12/23/creating-a-radial-gradient-fill-on-a-rect-object-in-flex-gumbo/">&#8220;Creating a radial gradient fill on a Rect object in Flex Gumbo&#8221;</a>, we saw how you could create a radial gradient fill on a Flex Gumbo Rect object by setting the fill property to a RadialGradient object.</p> <p>The following example shows how you can set the origin X and Y [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous example, <a href="http://blog.flexexamples.com/2008/12/23/creating-a-radial-gradient-fill-on-a-rect-object-in-flex-gumbo/">&#8220;Creating a radial gradient fill on a Rect object in Flex Gumbo&#8221;</a>, we saw how you could create a radial gradient fill on a Flex Gumbo Rect object by setting the <code>fill</code> property to a RadialGradient object.</p>
<p>The following example shows how you can set the origin X and Y coordinate for a radial gradient fill in Flex Gumbo by setting the <code>x</code> and <code>y</code> properties on the RadialGradient object.</p>
<p>Full code after the jump.</p>
<p><span id="more-910"></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="">View MXML</a></p>
<pre class="code">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!-- http://blog.flexexamples.com/2008/12/24/setting-the-origin-x-and-y-coordinate-for-a-radial-gradient-fill-in-flex-gumbo/ --&gt;
&lt;Application name=&quot;Rect_fill_RadialGradient_x_test&quot;
        xmlns=&quot;http://ns.adobe.com/mxml/2009&quot;
        layout=&quot;vertical&quot;
        verticalAlign=&quot;middle&quot;
        backgroundColor=&quot;white&quot;&gt;

    &lt;ApplicationControlBar dock=&quot;true&quot;&gt;
        &lt;Form styleName=&quot;plain&quot;&gt;
            &lt;FormItem label=&quot;x:&quot;&gt;
                &lt;HSlider id=&quot;sliderX&quot;
                        minimum=&quot;-150&quot;
                        maximum=&quot;450&quot;
                        value=&quot;150&quot;
                        snapInterval=&quot;1&quot;
                        tickInterval=&quot;50&quot;
                        liveDragging=&quot;true&quot; /&gt;
            &lt;/FormItem&gt;
            &lt;FormItem label=&quot;y:&quot;&gt;
                &lt;HSlider id=&quot;sliderY&quot;
                        minimum=&quot;-100&quot;
                        maximum=&quot;300&quot;
                        value=&quot;100&quot;
                        snapInterval=&quot;1&quot;
                        tickInterval=&quot;50&quot;
                        liveDragging=&quot;true&quot; /&gt;
            &lt;/FormItem&gt;
        &lt;/Form&gt;
    &lt;/ApplicationControlBar&gt;

    &lt;Graphic&gt;
        &lt;Rect id=&quot;rect&quot; width=&quot;300&quot; height=&quot;200&quot;&gt;
            &lt;fill&gt;
                &lt;RadialGradient x=&quot;{sliderX.value}&quot; y=&quot;{sliderY.value}&quot;&gt;
                    &lt;entries&gt;
                        &lt;GradientEntry color=&quot;red&quot; /&gt;
                        &lt;GradientEntry color=&quot;white&quot; /&gt;
                        &lt;GradientEntry color=&quot;blue&quot; /&gt;
                    &lt;/entries&gt;
                &lt;/RadialGradient&gt;
            &lt;/fill&gt;
        &lt;/Rect&gt;
    &lt;/Graphic&gt;

&lt;/Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/Rect_fill_RadialGradient_x_test/bin/srcview/">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/Rect_fill_RadialGradient_x_test/bin/main_4390.html" width="100%" height="350"></iframe></p>
<p class="alert">This entry is based on a beta version of the Flex Gumbo SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex Gumbo SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the origin X and Y coordinate for a radial gradient fill in Flex Gumbo on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/12/24/setting-the-origin-x-and-y-coordinate-for-a-radial-gradient-fill-in-flex-gumbo/',contentID: 'post-910',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'fill,Gumbo,x,y',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/12/24/setting-the-origin-x-and-y-coordinate-for-a-radial-gradient-fill-in-flex-gumbo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting the origin X and Y coordinate for a linear gradient fill in Flex Gumbo</title>
		<link>http://blog.flexexamples.com/2008/11/30/setting-the-origin-x-and-y-coordinate-for-a-linear-gradient-fill-in-flex-gumbo/</link>
		<comments>http://blog.flexexamples.com/2008/11/30/setting-the-origin-x-and-y-coordinate-for-a-linear-gradient-fill-in-flex-gumbo/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 07:50:35 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta]]></category>
		<category><![CDATA[FXG]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[lineargradient]]></category>
		<category><![CDATA[rotation]]></category>
		<category><![CDATA[x]]></category>
		<category><![CDATA[y]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/11/30/setting-the-origin-x-and-y-coordinate-for-a-linear-gradient-fill-in-flex-gumbo/</guid>
		<description><![CDATA[<p>The following example shows how you can set the origin X and Y coordinate for a linear gradient fill in Flex Gumbo by setting the x and y properties on the LinearGradient object.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/LinearGradient_x_test/bin/srcview/source/main_4235.mxml.html">View MXML</a></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2008/11/30/setting-the-origin-x-and-y-coordinate-for-a-linear-gradient-fill-in-flex-gumbo/ --&#62; &#60;Application name=&#34;LinearGradient_x_test&#34; xmlns=&#34;http://ns.adobe.com/mxml/2009&#34; layout=&#34;vertical&#34; verticalAlign=&#34;middle&#34; backgroundColor=&#34;white&#34;&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the origin X and Y coordinate for a linear gradient fill in Flex Gumbo by setting the <code>x</code> and <code>y</code> properties on the LinearGradient object.</p>
<p>Full code after the jump.</p>
<p><span id="more-883"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/LinearGradient_x_test/bin/srcview/source/main_4235.mxml.html">View MXML</a></p>
<pre class="code">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!-- http://blog.flexexamples.com/2008/11/30/setting-the-origin-x-and-y-coordinate-for-a-linear-gradient-fill-in-flex-gumbo/ --&gt;
&lt;Application name=&quot;LinearGradient_x_test&quot;
        xmlns=&quot;http://ns.adobe.com/mxml/2009&quot;
        layout=&quot;vertical&quot;
        verticalAlign=&quot;middle&quot;
        backgroundColor=&quot;white&quot;&gt;

    &lt;ApplicationControlBar dock=&quot;true&quot;&gt;
        &lt;Form styleName=&quot;plain&quot;&gt;
            &lt;FormItem label=&quot;x:&quot;&gt;
                &lt;HSlider id=&quot;xSlider&quot;
                        minimum=&quot;-100&quot;
                        maximum=&quot;100&quot;
                        value=&quot;0&quot;
                        snapInterval=&quot;1&quot;
                        tickInterval=&quot;25&quot;
                        liveDragging=&quot;true&quot; /&gt;
            &lt;/FormItem&gt;
            &lt;FormItem label=&quot;y:&quot;&gt;
                &lt;HSlider id=&quot;ySlider&quot;
                        minimum=&quot;-100&quot;
                        maximum=&quot;100&quot;
                        value=&quot;0&quot;
                        snapInterval=&quot;1&quot;
                        tickInterval=&quot;25&quot;
                        liveDragging=&quot;true&quot; /&gt;
            &lt;/FormItem&gt;
            &lt;FormItem label=&quot;rotation:&quot;&gt;
                &lt;HSlider id=&quot;rotationSlider&quot;
                        minimum=&quot;-360&quot;
                        maximum=&quot;360&quot;
                        value=&quot;0&quot;
                        snapInterval=&quot;1&quot;
                        tickInterval=&quot;45&quot;
                        liveDragging=&quot;true&quot; /&gt;
            &lt;/FormItem&gt;
        &lt;/Form&gt;
    &lt;/ApplicationControlBar&gt;

    &lt;Graphic&gt;
        &lt;Ellipse id=&quot;ellipse&quot; width=&quot;300&quot; height=&quot;200&quot;&gt;
            &lt;fill&gt;
                &lt;LinearGradient id=&quot;linearGrad&quot;
                        x=&quot;{xSlider.value}&quot;
                        y=&quot;{ySlider.value}&quot;
                        rotation=&quot;{rotationSlider.value}&quot;&gt;
                    &lt;GradientEntry color=&quot;red&quot; /&gt;
                    &lt;GradientEntry color=&quot;white&quot; /&gt;
                    &lt;GradientEntry color=&quot;blue&quot; /&gt;
                &lt;/LinearGradient&gt;
            &lt;/fill&gt;
        &lt;/Ellipse&gt;
    &lt;/Graphic&gt;

&lt;/Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/LinearGradient_x_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/LinearGradient_x_test/bin/main_4235.html" width="100%" height="350"></iframe></p>
<p class="alert">This entry is based on a beta version of the Flex Gumbo SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex Gumbo SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the origin X and Y coordinate for a linear gradient fill in Flex Gumbo on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/11/30/setting-the-origin-x-and-y-coordinate-for-a-linear-gradient-fill-in-flex-gumbo/',contentID: 'post-883',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,lineargradient,rotation,x,y',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/11/30/setting-the-origin-x-and-y-coordinate-for-a-linear-gradient-fill-in-flex-gumbo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

