shizny
04-30-2009, 04:52 PM
Hello,
I'm working on a progressBar for the loading of several local files in an AIR app. I am calling an update function out of a loop that runs on every line of a file that has loaded. I can't, for the life of me, get the progressbar to visually update. I've tried just about everything with the progressBar, manual mode, event mode (dispatching my own ProgressEvents, etc.) and nothing will work. I'm running mac os x10.4 and compiling for flash player 9. Anybody have any ideas. Here is a code snippet from where I'm updating the progressbar.
Like I said, I can verify, through breakpoints, that setPercentage is getting called, but no visual result displayed.
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml">
<!--<mx:Dissolve id="myShow" duration="500" alphaFrom="0.0" alphaTo="1.0"/>-->
<mx:Box>
<mx:Script>
<![CDATA[
import com.widgetmakers.coolwidget.globals.MessageStrings ;
[Bindable] private var progressLabel:String = MessageStrings.EXTRACTING_INVOICE_INFO;
public function setPercentage(thePercentage:Number):void {
var theP:Number = Math.round(thePercentage);
this.bar.setProgress( theP, 100 );
}
]]>
</mx:Script>
<mx:VBox>
<mx:ProgressBar id="bar" labelPlacement="bottom" themeColor="#F20D7A"
minimum="0" visible="true" maximum="100" label="{this.progressLabel}"
direction="right" mode="manual" width="100%"/>
</mx:VBox>
</mx:Box>
</mx:Module>
I'm working on a progressBar for the loading of several local files in an AIR app. I am calling an update function out of a loop that runs on every line of a file that has loaded. I can't, for the life of me, get the progressbar to visually update. I've tried just about everything with the progressBar, manual mode, event mode (dispatching my own ProgressEvents, etc.) and nothing will work. I'm running mac os x10.4 and compiling for flash player 9. Anybody have any ideas. Here is a code snippet from where I'm updating the progressbar.
Like I said, I can verify, through breakpoints, that setPercentage is getting called, but no visual result displayed.
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml">
<!--<mx:Dissolve id="myShow" duration="500" alphaFrom="0.0" alphaTo="1.0"/>-->
<mx:Box>
<mx:Script>
<![CDATA[
import com.widgetmakers.coolwidget.globals.MessageStrings ;
[Bindable] private var progressLabel:String = MessageStrings.EXTRACTING_INVOICE_INFO;
public function setPercentage(thePercentage:Number):void {
var theP:Number = Math.round(thePercentage);
this.bar.setProgress( theP, 100 );
}
]]>
</mx:Script>
<mx:VBox>
<mx:ProgressBar id="bar" labelPlacement="bottom" themeColor="#F20D7A"
minimum="0" visible="true" maximum="100" label="{this.progressLabel}"
direction="right" mode="manual" width="100%"/>
</mx:VBox>
</mx:Box>
</mx:Module>