<?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; Resize</title>
	<atom:link href="http://blog.flexexamples.com/category/resize/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>Centering a pop up window when a Flex application is resized</title>
		<link>http://blog.flexexamples.com/2008/04/06/centering-a-pop-up-window-when-a-flex-application-is-resized/</link>
		<comments>http://blog.flexexamples.com/2008/04/06/centering-a-pop-up-window-when-a-flex-application-is-resized/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 16:19:07 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Alert]]></category>
		<category><![CDATA[PopUpManager]]></category>
		<category><![CDATA[PopUpMenuButton]]></category>
		<category><![CDATA[Resize]]></category>
		<category><![CDATA[centerPopUp()]]></category>
		<category><![CDATA[show()]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/04/06/centering-a-pop-up-window-when-a-flex-application-is-resized/</guid>
		<description><![CDATA[<p>The following example shows how you can center a pop up window (in this case an Alert control) when the Flex application is resized by using the resize event on the &#60;mx:Application /&#62; tag and using the static PopUpManager.centerPopUp() method.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/PopUpManager_centerPopUp_test/bin/srcview/source/main.mxml.html">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2008/04/06/centering-a-pop-up-window-when-a-flex-application-is-resized/ [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can center a pop up window (in this case an Alert control) when the Flex application is resized by using the <code>resize</code> event on the &lt;mx:Application /&gt; tag and using the static <code>PopUpManager.centerPopUp()</code> method.</p>
<p>Full code after the jump.</p>
<p><span id="more-585"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/PopUpManager_centerPopUp_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/04/06/centering-a-pop-up-window-when-a-flex-application-is-resized/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"
        resize="application_resize(event);"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.ResizeEvent;
            import mx.controls.Alert;
            import mx.managers.PopUpManager;

            private var alert:Alert;

            private function init():void {
                alert = Alert.show("The quick brown fox jumped over the lazy dog.", "title");
            }

            private function application_resize(evt:ResizeEvent):void {
                if (alert) {
                    PopUpManager.centerPopUp(alert);
                }
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button label="Launch!" click="init();" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/PopUpManager_centerPopUp_test/bin/srcview/index.html">View source</a> is enabled in the following example. | <a href="http://blog.flexexamples.com/wp-content/uploads/PopUpManager_centerPopUp_test/bin/main.html" target="_blank">Click here to open example in a new window</a></p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/PopUpManager_centerPopUp_test/bin/main.html" width="100%" height="300"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Centering a pop up window when a Flex application is resized on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/04/06/centering-a-pop-up-window-when-a-flex-application-is-resized/',contentID: 'post-585',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'centerPopUp(),show()',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/04/06/centering-a-pop-up-window-when-a-flex-application-is-resized/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Triggering effects when a container is resized</title>
		<link>http://blog.flexexamples.com/2007/09/23/triggering-effects-when-a-container-is-resized/</link>
		<comments>http://blog.flexexamples.com/2007/09/23/triggering-effects-when-a-container-is-resized/#comments</comments>
		<pubDate>Mon, 24 Sep 2007 05:58:03 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[Effects]]></category>
		<category><![CDATA[Panel]]></category>
		<category><![CDATA[Resize]]></category>
		<category><![CDATA[resizeEffect]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/23/triggering-effects-when-a-container-is-resized/</guid>
		<description><![CDATA[<p>The following example uses a resizeEffect effect along with a Resize tween effect (&#60;mx:Resize /&#62;) to create a smooth tween effect whenever the panel is resized.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Panel_resizeEffect_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/09/23/triggering-effects-when-a-container-is-resized/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&#62; &#60;mx:Script&#62; &#60;![CDATA[ private function sizePanel(w:uint, h:uint):void { panel.width [...]]]></description>
			<content:encoded><![CDATA[<p>The following example uses a <code>resizeEffect</code> effect along with a Resize tween effect (&lt;mx:Resize /&gt;) to create a smooth tween effect whenever the panel is resized.</p>
<p>Full code after the jump.</p>
<p><span id="more-197"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/Panel_resizeEffect_test/main.mxml">View MXML</a></p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;!-- http://blog.flexexamples.com/2007/09/23/triggering-effects-when-a-container-is-resized/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            private function sizePanel(w:uint, h:uint):void {
                panel.width = w;
                panel.height = h;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Resize id="resize" /&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Button label="160x160"
                click="sizePanel(160, 160);" /&gt;
        &lt;mx:Button label="240x160"
                click="sizePanel(240, 160);" /&gt;
        &lt;mx:Button label="160x240"
                click="sizePanel(160, 240);" /&gt;
        &lt;mx:Button label="320x240"
                click="sizePanel(320, 240);" /&gt;

        &lt;mx:Spacer width="100%" /&gt;

        &lt;mx:Label text="w:{panel.width}, h:{panel.height}" /&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:Panel id="panel"
            title="title"
            status="status"
            width="320"
            height="240"
            resizeEffect="{resize}"&gt;
        &lt;mx:Accordion id="accordion"
                historyManagementEnabled="false"
                width="100%"
                height="100%"&gt;
            &lt;mx:VBox label="Shipping Information" /&gt;
            &lt;mx:VBox label="Billing Information" /&gt;
        &lt;/mx:Accordion&gt;
        &lt;mx:ControlBar id="cb"&gt;
            &lt;mx:Button /&gt;
        &lt;/mx:ControlBar&gt;
    &lt;/mx:Panel&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/Panel_resizeEffect_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/Panel_resizeEffect_test/bin/main.html" width="100%" height="350"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Triggering effects when a container is resized on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/09/23/triggering-effects-when-a-container-is-resized/',contentID: 'post-197',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'resizeEffect',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/2007/09/23/triggering-effects-when-a-container-is-resized/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

