?1.下面的例子展示了如何设置进度条(ProgressBar)完成(100%)时的效果
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
????????layout="vertical"
????????verticalAlign="middle"
????????backgroundColor="white">
?
????<mx:Script>
????????<![CDATA[
????????????private var timer:Timer;
?
????????????private function init():void {
????????????????timer = new Timer(100);
????????????????timer.addEventListener(TimerEvent.TIMER,timer_timer);
????????????}
?
????????????private function timer_timer(evt:TimerEvent):void {
????????????????progressBar.setProgress(progressBar.value + 1,100);
????????????}
?
????????????private function progressBar_complete(evt:Event):void {
????????????????timer.stop();
????????????}
?
????????????private function resetProgressBar():void {
????????????????progressBar.setProgress(0,100);
????????????????progressBar.scaleX = 1.0; // 100%
????????????????progressBar.scaleY = 1.0; // 100%
????????????????progressBar.alpha = 1.0; // 100%
??