Reputation: 46919
What is wrong with the following code,I get the progress bar as loading only.
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2009/02/01/setting-the-bar-color-on-the-progressbar-control-in-flex/ -->
<mx:Application name="ProgressBar_barColor_test"
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white">
<mx:Script>
<![CDATA[
import mx.events.ColorPickerEvent;
private function colorPicker_change(evt:ColorPickerEvent):void {
progressBar.setStyle("barColor", evt.color);
}
]]>
</mx:Script>
<mx:ApplicationControlBar dock="true">
<mx:Form styleName="plain">
<mx:FormItem label="barColor:">
<mx:ColorPicker id="colorPicker"
selectedColor="red"
change="colorPicker_change(event);" />
</mx:FormItem>
</mx:Form>
</mx:ApplicationControlBar>
<mx:ProgressBar id="progressBar"
indeterminate="true"
labelPlacement="center"
height="100" />
</mx:Application>
Upvotes: 0
Views: 1052
Reputation: 6059
By "loading" I am assuming you mean the progress bar is not displaying any sort of specific progress. This is because you have the progress bar set as indeterminate, meaning it won't show progress, but will just animate to notify the user that progress is occurring but not by any specific amount.
Upvotes: 1