<?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; mode</title>
	<atom:link href="http://blog.flexexamples.com/tag/mode/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>Pausing the animation in an indeterminate ProgressBar control</title>
		<link>http://blog.flexexamples.com/2007/10/31/pausing-the-animation-in-an-indeterminate-progressbar-control/</link>
		<comments>http://blog.flexexamples.com/2007/10/31/pausing-the-animation-in-an-indeterminate-progressbar-control/#comments</comments>
		<pubDate>Thu, 01 Nov 2007 02:57:25 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[ProgressBar]]></category>
		<category><![CDATA[indeterminate]]></category>
		<category><![CDATA[mode]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/10/31/pausing-the-animation-in-an-indeterminate-progressbar-control/</guid>
		<description><![CDATA[<p>The following example shows how you can pause the indeterminate animation in a Flex ProgressBar control by setting the mode property to &#8220;polled&#8221; or &#8220;manual&#8221;. You can resume the animation by setting the mode back to &#8220;event&#8221;.</p> <p>Full code after the jump.</p> <p></p> <p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/ProgressBar_indeterminate_test/main.mxml">View MXML</a></p> &#60;?xml version="1.0" encoding="utf-8"?&#62; &#60;!-- http://blog.flexexamples.com/2007/10/31/pausing-the-animation-in-an-indeterminate-progressbar-control/ --&#62; &#60;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can pause the indeterminate animation in a Flex ProgressBar control by setting the <code>mode</code> property to &#8220;polled&#8221; or &#8220;manual&#8221;. You can resume the animation by setting the mode back to &#8220;event&#8221;.</p>
<p>Full code after the jump.</p>
<p><span id="more-263"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/ProgressBar_indeterminate_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/10/31/pausing-the-animation-in-an-indeterminate-progressbar-control/ --&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"&gt;

    &lt;mx:ApplicationControlBar dock="true"&gt;
        &lt;mx:Form&gt;
            &lt;mx:FormItem label="mode:"&gt;
                &lt;mx:ComboBox id="comboBox"&gt;
                    &lt;mx:dataProvider&gt;
                        &lt;mx:Array&gt;
                            &lt;mx:Object label="event" /&gt;
                            &lt;mx:Object label="polled" /&gt;
                            &lt;mx:Object label="manual" /&gt;
                        &lt;/mx:Array&gt;
                    &lt;/mx:dataProvider&gt;
                &lt;/mx:ComboBox&gt;
            &lt;/mx:FormItem&gt;
            &lt;mx:FormItem label="indeterminate:"&gt;
                &lt;mx:CheckBox id="checkBox" selected="true" /&gt;
            &lt;/mx:FormItem&gt;
        &lt;/mx:Form&gt;
    &lt;/mx:ApplicationControlBar&gt;

    &lt;mx:ProgressBar id="progressBar"
            indeterminate="{checkBox.selected}"
            mode="{comboBox.selectedItem.label}" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/ProgressBar_indeterminate_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/ProgressBar_indeterminate_test/bin/main.html" width="100%" height="200"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Pausing the animation in an indeterminate ProgressBar control on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/10/31/pausing-the-animation-in-an-indeterminate-progressbar-control/',contentID: 'post-263',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'indeterminate,mode',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/10/31/pausing-the-animation-in-an-indeterminate-progressbar-control/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Setting the ProgressBar control&#8217;s labelPlacement, mode, and conversion properties</title>
		<link>http://blog.flexexamples.com/2007/08/07/setting-the-progressbar-controls-labelplacement-mode-and-conversion-properties/</link>
		<comments>http://blog.flexexamples.com/2007/08/07/setting-the-progressbar-controls-labelplacement-mode-and-conversion-properties/#comments</comments>
		<pubDate>Wed, 08 Aug 2007 05:44:27 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[ProgressBar]]></category>
		<category><![CDATA[VideoDisplay]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[labelPlacement]]></category>
		<category><![CDATA[mode]]></category>
		<category><![CDATA[source]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/07/setting-the-progressbar-controls-labelplacement-mode-and-conversion-properties/</guid>
		<description><![CDATA[<p>Here was a neat trick I learnt today. You can set a ProgressBar control&#8217;s labelPlacement property to &#8220;center&#8221; and have it appear within the progress bar itseslf. Pretty handy!</p> <p>And just because that alone wasn&#8217;t really an interesting entry, I created a second progress bar which uses &#8220;polled&#8221; mode to determine how much of an [...]]]></description>
			<content:encoded><![CDATA[<p>Here was a neat trick I learnt today. You can set a ProgressBar control&#8217;s <code>labelPlacement</code> property to &#8220;center&#8221; and have it appear within the progress bar itseslf. Pretty handy!</p>
<p>And just because that alone wasn&#8217;t really an interesting entry, I created a second progress bar which uses &#8220;polled&#8221; mode to determine how much of an FLV has loaded (it monitors the <code>bytesLoaded</code> and <code>bytesTotal</code> properties of the UI object specified in the <code>source</code> parameter, which in this case is the VideoDisplay control). Finally I tweaked the <code>label</code> property to add the units (kilobytes) and set the <code>conversion</code> property to 1024 to convert from bytes to kilobytes. Whew!</p>
<p>Full code after the jump.</p>
<p><span id="more-63"></span></p>
<p class="download"><a href="http://blog.flexexamples.com/wp-content/uploads/ProgressBar_labelPlacement_test/main.mxml">View MXML</a></p>
<pre class="code" lang="actionscript">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white"&gt;

    &lt;mx:VideoDisplay id="videoDisplay"
            source="http://www.helpexamples.com/flash/video/water.flv"
            playheadUpdate="playheadTime.setProgress(videoDisplay.playheadTime, videoDisplay.totalTime)"
            minWidth="160"
            minHeight="120"  /&gt;

    &lt;mx:ProgressBar id="progressBar"
            width="{videoDisplay.width}"
            mode="polled"
            source="{videoDisplay}"
            label="%1 of %2 KB loaded (%3%%)"
            conversion="1024"
            labelPlacement="center" /&gt;

    &lt;mx:ProgressBar id="playheadTime"
            width="{videoDisplay.width}"
            mode="manual" label="%1 / %2"
            labelPlacement="center" /&gt;

&lt;/mx:Application&gt;
</pre>
<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/ProgressBar_labelPlacement_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/ProgressBar_labelPlacement_test/bin/main.html" width="100%" height="320"></iframe></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the ProgressBar control\&#039;s labelPlacement, mode, and conversion properties on FlexExamples.com',url: 'http://blog.flexexamples.com/2007/08/07/setting-the-progressbar-controls-labelplacement-mode-and-conversion-properties/',contentID: 'post-63',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'conversion,labelPlacement,mode,source',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/08/07/setting-the-progressbar-controls-labelplacement-mode-and-conversion-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

