チェンジセット 843

差分発生行の前後
無視リスト:
コミット日時:
2008/07/14 23:51:31 (4 ヶ月前)
コミッタ:
mzp
ログメッセージ:

ProgressBar?

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • air/ByteCodeDisassembler/Controller.as

    r842 r843  
    1212        public var frame : Array  = []; 
    1313        public var info  : Object = []; 
     14 
     15        // listener 
    1416        private var onLoad   : Array = []; 
    1517        private var onInfo     : Array = []; 
    1618        private var onProgress : Array = []; 
    1719         
     20        private var total:uint = 0; 
     21        private var loaded: uint = 0; 
     22         
     23 
     24         
    1825        private var stream : URLStream; 
     26 
     27        // -------------------- 
     28        // 進捗状況の取得 
     29        // -------------------- 
     30        public function get bytesLoaded():uint{ 
     31            return this.loaded; 
     32        } 
     33 
     34        public function get bytesTotal():uint{ 
     35            return this.total; 
     36        } 
    1937         
     38 
    2039        // -------------------- 
    2140        //event handler 
     
    7190 
    7291            var swf:SwfStream = new SwfStream(bytes); 
     92            this.total = swf.length; 
    7393            swf.seekToBody(); 
    7494            try { 
    7595                for (;;) { 
     96                    this.loaded = swf.position; 
     97                    notify(onProgress); 
     98 
    7699                    var byte:uint = swf.readShort(); 
    77100                    var tag:uint = byte >>> 6; 
  • air/ByteCodeDisassembler/Main.mxml

    r842 r843  
    2929            } 
    3030        }); 
     31    controller.addProgressListener(function () : void{ 
     32            self.progress.setProgress(self.controller.bytesLoaded,self.controller.bytesTotal); 
     33        }); 
    3134} 
    3235    ]]> 
     
    4750    </HBox> 
    4851  </HBox> 
     52  <ProgressBar width="100%" id="progress" mode="manual"/> 
    4953</Application>