チェンジセット 377
- コミット日時:
- 2008/05/08 01:42:43 (7 ヶ月前)
- ファイル:
-
- air/AirAutoUpdater/trunk/bin/AirAutoUpdater.swc (更新) (変更前)
- air/AirAutoUpdater/trunk/build.sh (更新) (1 diff)
- air/AirAutoUpdater/trunk/samples/sample-app.xml (更新) (1 diff)
- air/AirAutoUpdater/trunk/samples/sample.mxml (更新) (1 diff)
- air/AirAutoUpdater/trunk/samples/sample.swf (更新) (変更前)
- air/AirAutoUpdater/trunk/src/net/jirox/AirAutoUpdater.as (更新) (7 diffs)
- air/AirAutoUpdater/trunk/src/net/jirox/PopUpProgressBar.mxml (追加)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
air/AirAutoUpdater/trunk/build.sh
r374 r377 1 1 #!/bin/sh 2 2 # for swc 3 acompc -output bin/AirAutoUpdater.swc -source-path src -include-classes net.jirox.AirAutoUpdater3 _JAVA_OPTIONS="-Dfile.encoding=UTF-8" acompc -output bin/AirAutoUpdater.swc -source-path src -include-classes net.jirox.AirAutoUpdater 4 4 5 5 # for sample 6 amxmlc --source-path=sample sample/sample.mxml6 _JAVA_OPTIONS="-Dfile.encoding=UTF-8" amxmlc --source-path=samples samples/sample.mxml air/AirAutoUpdater/trunk/samples/sample-app.xml
r374 r377 7 7 <content>sample.swf</content> 8 8 <visible>true</visible> 9 <width> 100</width>10 <height> 100</height>9 <width>500</width> 10 <height>300</height> 11 11 </initialWindow> 12 12 </application> air/AirAutoUpdater/trunk/samples/sample.mxml
r374 r377 2 2 <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:jx="net.jirox.*"> 3 3 <jx:AirAutoUpdater url="http://jirox.net/as3/BlurHighlight/version.xml"/> 4 <mx:Label text="Sample"/> 4 5 </mx:WindowedApplication> air/AirAutoUpdater/trunk/src/net/jirox/AirAutoUpdater.as
r374 r377 24 24 25 25 package net.jirox { 26 import flash.display.DisplayObject; 26 27 import flash.events.Event; 27 28 import flash.events.IOErrorEvent; … … 30 31 import flash.net.URLLoaderDataFormat; 31 32 import mx.events.CloseEvent; 33 import mx.core.Application; 32 34 import mx.core.IMXMLObject; 33 35 import mx.controls.Alert; 36 import mx.managers.PopUpManager; 34 37 import flash.filesystem.File; 35 38 import flash.filesystem.FileMode; … … 37 40 import flash.desktop.NativeApplication; 38 41 import flash.desktop.Updater; 42 import net.jirox.PopUpProgressBar; 39 43 40 44 public class AirAutoUpdater implements IMXMLObject { … … 47 51 private var remoteVersion:String; 48 52 private var airUrl:String; 53 private var popup:PopUpProgressBar; 49 54 50 55 /////////////// Events //////////////// … … 53 58 */ 54 59 private function downloadAirFileCompleteHandler(event:Event):void { 60 PopUpManager.removePopUp(popup); 55 61 var airFile:File = File.applicationStorageDirectory.resolvePath("updateFile.air"); 56 62 var fs:FileStream = new FileStream(); … … 67 73 */ 68 74 private function downloadAirFileIOErrorHandler(event:IOErrorEvent):void { 75 PopUpManager.removePopUp(popup); 69 76 Alert.show('AirファイルのDLに失敗しました'); 70 77 } … … 124 131 airLoader.addEventListener(IOErrorEvent.IO_ERROR, downloadAirFileIOErrorHandler); 125 132 airLoader.load(new URLRequest(airUrl)); 126 var _airFile:File = File.applicationStorageDirectory.resolvePath("update.air"); 133 134 popup = PopUpProgressBar(PopUpManager.createPopUp(DisplayObject(Application.application), PopUpProgressBar, true)); 135 PopUpManager.centerPopUp(popup); 136 popup.progress.source = airLoader; 127 137 } 128 138 }
