チェンジセット 3140
- コミット日時:
- 2009/09/29 20:59:36 (4 年前)
- ファイル:
-
- as3/MultiProgressManager/trunk/sample/deploy/main.swf (更新) (変更前)
- as3/MultiProgressManager/trunk/sample/deploy/preloader.swf (更新) (変更前)
- as3/MultiProgressManager/trunk/sample/src/classes/multiprogresssample/controller/thread/AssetsLoadThread.as (更新) (1 diff)
- as3/MultiProgressManager/trunk/src/com/katapad/load/multiprogress/BulkLoaderProgressModel.as (更新) (3 diffs)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/MultiProgressManager/trunk/sample/src/classes/multiprogresssample/controller/thread/AssetsLoadThread.as
r3052 r3140 103 103 104 104 //BulkLoader用のプログレスモデル 105 _bulkModel = new BulkLoaderProgressModel(_bulkLoader, 0.3 );105 _bulkModel = new BulkLoaderProgressModel(_bulkLoader, 0.3, BulkLoaderProgressModel.PERCENT_WEIGHT_PERCENT); 106 106 _context.progressManager.addProgress(_bulkModel); 107 107 as3/MultiProgressManager/trunk/src/com/katapad/load/multiprogress/BulkLoaderProgressModel.as
r3043 r3140 42 42 /** bytesLoaded / currentBytesTotal */ 43 43 public static const PERCENT_BYTES_TOTAL:uint = 1; 44 /** weightPercentを使う */ 45 public static const PERCENT_WEIGHT_PERCENT:uint = 2; 44 46 45 47 //---------------------------------- … … 53 55 * @param bulkLoader BulkLoaderのインスタンス 54 56 * @param percentRange パーセントのレンジ 55 * @param percentType パーセントのタイプを指定します。BulkLoaderProgressModel.PERCENT_ITEM_RATIO or BulkLoaderProgressModel.PERCENT_BYTES_TOTAL 57 * @param percentType パーセントのタイプを指定します。BulkLoaderProgressModel.PERCENT_ITEM_RATIO or BulkLoaderProgressModel.PERCENT_BYTES_TOTAL or PERCENT_WEIGHT_PERCENT 56 58 */ 57 public function BulkLoaderProgressModel(bulkLoader:BulkLoader, percentRange:Number, percentType:uint = BulkLoaderProgressModel.PERCENT_ ITEM_RATIO)59 public function BulkLoaderProgressModel(bulkLoader:BulkLoader, percentRange:Number, percentType:uint = BulkLoaderProgressModel.PERCENT_WEIGHT_PERCENT) 58 60 { 59 61 _bulkLoader = bulkLoader; … … 104 106 private function progressHandler(event:BulkProgressEvent):void 105 107 { 106 if (_percentType == BulkLoaderProgressModel.PERCENT_ITEM_RATIO) 107 percent = event.ratioLoaded; 108 else 109 percent = event.percentLoaded; 108 switch(_percentType) 109 { 110 case BulkLoaderProgressModel.PERCENT_ITEM_RATIO: 111 percent = event.ratioLoaded; 112 break; 113 case BulkLoaderProgressModel.PERCENT_BYTES_TOTAL : 114 percent = event.percentLoaded; 115 break; 116 case BulkLoaderProgressModel.PERCENT_WEIGHT_PERCENT : 117 percent = event.weightPercent; 118 break; 119 default : 120 throw new Error("_percentTypeの値が不正です"); 121 break; 122 } 110 123 } 111 124

