<?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; BitmapImageResizeMode</title>
	<atom:link href="http://blog.flexexamples.com/category/bitmapimageresizemode/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 resize mode on a Spark BitmapImage object in Flex Gumbo</title>
		<link>http://blog.flexexamples.com/2008/12/14/setting-the-resize-mode-on-a-bitmapgraphic-object-in-flex-gumbo/</link>
		<comments>http://blog.flexexamples.com/2008/12/14/setting-the-resize-mode-on-a-bitmapgraphic-object-in-flex-gumbo/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 07:53:47 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta1]]></category>
		<category><![CDATA[BitmapImage]]></category>
		<category><![CDATA[BitmapImageResizeMode]]></category>
		<category><![CDATA[FXG]]></category>
		<category><![CDATA[needsSWF]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[resizeMode]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/12/14/setting-the-resize-mode-on-a-bitmapgraphic-object-in-flex-gumbo/</guid>
		<description><![CDATA[<p>The following example shows how you can set the resize mode on a Flex Gumbo BitmapO,age object by setting the resizeMode property to one of the static constants in the BitmapImageResizeMode class.</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 SDK [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the resize mode on a Flex Gumbo BitmapO,age object by setting the <code>resizeMode</code> property to one of the static constants in the BitmapImageResizeMode class.</p>
<p>Full code after the jump.</p>
<p><span id="more-894"></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="1.0" encoding="utf-8"?&gt;
&lt;s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/halo"&gt;
    &lt;s:layout&gt;
        &lt;s:VerticalLayout /&gt;
    &lt;/s:layout&gt;

    &lt;fx:Script&gt;
        &lt;![CDATA[
            import mx.events.IndexChangedEvent;
            import spark.primitives.BitmapImageResizeMode;

            protected function dropDownList_selectionChanged(evt:IndexChangedEvent):void {
                bitmapImg.resizeMode = dropDownList.selectedItem;
            }
        ]]&gt;
    &lt;/fx:Script&gt;

    &lt;mx:ApplicationControlBar width="100%" cornerRadius="0"&gt;
        &lt;mx:Form styleName="plain"&gt;
            &lt;mx:FormItem label="resizeMode:"&gt;
                &lt;s:DropDownList id="dropDownList"
                        prompt="Please select a resize mode:"
                        selectionChanged="dropDownList_selectionChanged(event);"&gt;
                    &lt;s:dataProvider&gt;
                        &lt;s:ArrayList&gt;
                            &lt;fx:String&gt;{BitmapImageResizeMode.NORMAL}&lt;/fx:String&gt;
                            &lt;fx:String&gt;{BitmapImageResizeMode.REPEAT}&lt;/fx:String&gt;
                            &lt;fx:String&gt;{BitmapImageResizeMode.SCALE}&lt;/fx:String&gt;
                        &lt;/s:ArrayList&gt;
                    &lt;/s:dataProvider&gt;
                &lt;/s:DropDownList&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="percentWidth:"&gt;
                &lt;s:HSlider id="sliderH"
                        minimum="10"
                        maximum="90"
                        liveDragging="true" /&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="percentHeight:"&gt;
                &lt;s:HSlider id="sliderV"
                        minimum="10"
                        maximum="90"
                        liveDragging="true" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;s:Group width="100%" height="100%"&gt;
        &lt;s:BitmapImage id="bitmapImg"
                source="@Embed('assets/fx_appicon-tn.gif')"
                percentWidth="{sliderH.value}"
                percentHeight="{sliderV.value}"
                horizontalCenter="0"
                verticalCenter="0" /&gt;
    &lt;/s:Group&gt;

&lt;/s:Application&gt;
</pre>
<p><!--</p>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/BitmapGraphic_resizeMode_test/bin/srcview/">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/BitmapGraphic_resizeMode_test/bin/main_4737.html" width="100%" height="600"></iframe><br />
&#8211;></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 resize mode on a Spark BitmapImage object in Flex Gumbo on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/12/14/setting-the-resize-mode-on-a-bitmapgraphic-object-in-flex-gumbo/',contentID: 'post-894',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,resizeMode',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/14/setting-the-resize-mode-on-a-bitmapgraphic-object-in-flex-gumbo/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

