2011-01-05 72 views
0

以下代码出现了问题,我只将进度条作为加载进行加载。在flex中加载进度条

<?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> 
+0

进度条应该怎么做呢? – JeffryHouser 2011-01-05 19:01:33

回答

1

通过“加载”我假设你的意思是进度条没有显示任何特定进度。这是因为您将进度条设置为不确定,这意味着它不会显示进度,但只会生成动画以通知用户进度正在发生,但不会以任何特定的量进行。