<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Setting the value of a Flex Progress Bar</title>
	<link>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Fri, 05 Dec 2008 01:21:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: vivek</title>
		<link>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/#comment-16865</link>
		<author>vivek</author>
		<pubDate>Mon, 24 Nov 2008 06:03:54 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/#comment-16865</guid>
		<description>I tried on Mozilla on Windows XP it did not work but it works fine on IE on teh same machine, looks like some bug with Flex version for Mozilla</description>
		<content:encoded><![CDATA[<p>I tried on Mozilla on Windows XP it did not work but it works fine on IE on teh same machine, looks like some bug with Flex version for Mozilla</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: antonic</title>
		<link>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/#comment-16781</link>
		<author>antonic</author>
		<pubDate>Tue, 18 Nov 2008 16:28:12 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/#comment-16781</guid>
		<description>A hint: 

http://bugs.adobe.com/jira/browse/SDK-16199
"Basic components don't work when compiled in Flex 4 and run on player 9 (TextInput, TextArea, DateField, NumericStepper etc)"</description>
		<content:encoded><![CDATA[<p>A hint: </p>
<p><a href="http://bugs.adobe.com/jira/browse/SDK-16199" rel="nofollow">http://bugs.adobe.com/jira/browse/SDK-16199</a><br />
&#8220;Basic components don&#8217;t work when compiled in Flex 4 and run on player 9 (TextInput, TextArea, DateField, NumericStepper etc)&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: antonic</title>
		<link>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/#comment-16757</link>
		<author>antonic</author>
		<pubDate>Mon, 17 Nov 2008 20:31:20 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/#comment-16757</guid>
		<description>Hey guys ! This example works though! 
http://blog.flexexamples.com/2007/10/07/changing-a-flex-progressbar-controls-direction/

What gives?!</description>
		<content:encoded><![CDATA[<p>Hey guys ! This example works though!<br />
<a href="http://blog.flexexamples.com/2007/10/07/changing-a-flex-progressbar-controls-direction/" rel="nofollow">http://blog.flexexamples.com/2007/10/07/changing-a-flex-progressbar-controls-direction/</a></p>
<p>What gives?!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: antonic</title>
		<link>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/#comment-16756</link>
		<author>antonic</author>
		<pubDate>Mon, 17 Nov 2008 20:25:33 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/#comment-16756</guid>
		<description>forgot to mention that i am using
WinXP: IE7 with Flash 10,0,12,36 / FF3 with Flash 9,0,124,0</description>
		<content:encoded><![CDATA[<p>forgot to mention that i am using<br />
WinXP: IE7 with Flash 10,0,12,36 / FF3 with Flash 9,0,124,0</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: antonic</title>
		<link>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/#comment-16754</link>
		<author>antonic</author>
		<pubDate>Mon, 17 Nov 2008 20:18:46 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/#comment-16754</guid>
		<description>hi guys,

i first stumbled into a progress bar that does not "progress", even with a manual mode, minimum and maximum set explicitly. when i reach the end of the loop, the bar suddenly shows 100%!!!. i looked up and found this page, and then i realized it was not about my code (very simple code looping through an array of 3600 items -- sample below).

when i debug and step into ProgressBar.as/_setProgress(), the arguments are being passed correctly to the private vars _value, and _maximum.



still no solution. anyone else?

thanks.


----- code sample ---
MXML:
&lt;pre class="code"&gt;
&#60;mx:ProgressBar 
	id="progressBar" 
	labelPlacement="center" 
	mode="{ ProgressBarMode.MANUAL }" 
	minimum="0"
/&#62;
&lt;/pre&gt;

AS3:
&lt;pre class="code"&gt;
var progressBarValue:uint = 0; 
var progressBarMaximum:Number = file.split("\n").length; //3600 lines
	
trace( progressBarMaximum, "lines" );
progressBar.maximum = progressBarMaximum;
	
for each ( var line:String in file.split("\n") ) {
		
    /* get lines that start with a digit */
    if ( line.match(/^\d+/) ) {
        progressBar.setProgress( ++progressBarValue, progressBarMaximum);

&lt;/pre&gt;
----- end of code sample ----</description>
		<content:encoded><![CDATA[<p>hi guys,</p>
<p>i first stumbled into a progress bar that does not &#8220;progress&#8221;, even with a manual mode, minimum and maximum set explicitly. when i reach the end of the loop, the bar suddenly shows 100%!!!. i looked up and found this page, and then i realized it was not about my code (very simple code looping through an array of 3600 items &#8212; sample below).</p>
<p>when i debug and step into ProgressBar.as/_setProgress(), the arguments are being passed correctly to the private vars _value, and _maximum.</p>
<p>still no solution. anyone else?</p>
<p>thanks.</p>
<p>&#8212;&#8211; code sample &#8212;<br />
MXML:</p>
<pre class="code">
&lt;mx:ProgressBar
	id="progressBar"
	labelPlacement="center"
	mode="{ ProgressBarMode.MANUAL }"
	minimum="0"
/&gt;
</pre>
<p>AS3:</p>
<pre class="code">
var progressBarValue:uint = 0;
var progressBarMaximum:Number = file.split("n").length; //3600 lines

trace( progressBarMaximum, "lines" );
progressBar.maximum = progressBarMaximum;

for each ( var line:String in file.split("n") ) {

    /* get lines that start with a digit */
    if ( line.match(/^d+/) ) {
        progressBar.setProgress( ++progressBarValue, progressBarMaximum);
</pre>
<p>&#8212;&#8211; end of code sample &#8212;-</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aryan</title>
		<link>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/#comment-15902</link>
		<author>aryan</author>
		<pubDate>Sat, 27 Sep 2008 23:37:45 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/#comment-15902</guid>
		<description>&lt;pre class="code"&gt;
this.mode = "manual";
&lt;/pre&gt;
u have to set the mode to manual orelse it wouldn't work</description>
		<content:encoded><![CDATA[<pre class="code">
this.mode = "manual";
</pre>
<p>u have to set the mode to manual orelse it wouldn&#8217;t work</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/#comment-15395</link>
		<author>peterd</author>
		<pubDate>Mon, 08 Sep 2008 19:41:50 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/#comment-15395</guid>
		<description>Thanks everybody,

The workaround seems to be using &lt;code&gt;slider.maximum&lt;/code&gt; or hardcoding 360 instead of relying on &lt;code&gt;progressBar.maximum&lt;/code&gt;.

I've filed a bug for this at http://bugs.adobe.com/jira/browse/SDK-16752 and we will investigate it further to see if this is a Flex SDK issue or possibly a Flash Player issue.

Feel free to add any bug-related comments to the bug in the Flex bug base, &lt;a href="http://bugs.adobe.com/jira/browse/SDK-16752" rel="nofollow"&gt;&lt;u&gt;SDK-16752&lt;/u&gt;&lt;/a&gt;.

Peter</description>
		<content:encoded><![CDATA[<p>Thanks everybody,</p>
<p>The workaround seems to be using <code>slider.maximum</code> or hardcoding 360 instead of relying on <code>progressBar.maximum</code>.</p>
<p>I&#8217;ve filed a bug for this at <a href="http://bugs.adobe.com/jira/browse/SDK-16752" rel="nofollow">http://bugs.adobe.com/jira/browse/SDK-16752</a> and we will investigate it further to see if this is a Flex SDK issue or possibly a Flash Player issue.</p>
<p>Feel free to add any bug-related comments to the bug in the Flex bug base, <a href="http://bugs.adobe.com/jira/browse/SDK-16752" rel="nofollow"><u>SDK-16752</u></a>.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ian</title>
		<link>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/#comment-15394</link>
		<author>ian</author>
		<pubDate>Mon, 08 Sep 2008 17:39:38 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/#comment-15394</guid>
		<description>10,0,2,26 mac debug is also not working</description>
		<content:encoded><![CDATA[<p>10,0,2,26 mac debug is also not working</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/#comment-14886</link>
		<author>Nick</author>
		<pubDate>Sat, 23 Aug 2008 18:05:45 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/#comment-14886</guid>
		<description>This looks to be like a bug in flex.  I see same problem.  "progressBar.maximum" is getting defaulting to 0.  Change it to 360, and it will run fine.</description>
		<content:encoded><![CDATA[<p>This looks to be like a bug in flex.  I see same problem.  &#8220;progressBar.maximum&#8221; is getting defaulting to 0.  Change it to 360, and it will run fine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GregL</title>
		<link>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/#comment-14468</link>
		<author>GregL</author>
		<pubDate>Mon, 04 Aug 2008 16:54:53 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2008/02/16/setting-the-value-of-a-flex-progress-bar/#comment-14468</guid>
		<description>This example does not work for me either.  

Incidentally, I'm using 9,0,124,0 (debug)...and it looks like everyone else who can't get it to work is using the 9,0,124,0 version of the player.</description>
		<content:encoded><![CDATA[<p>This example does not work for me either.  </p>
<p>Incidentally, I&#8217;m using 9,0,124,0 (debug)&#8230;and it looks like everyone else who can&#8217;t get it to work is using the 9,0,124,0 version of the player.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
