チェンジセット 1099
- コミット日時:
- 2008/08/27 18:16:35 (5 年前)
- ファイル:
-
- as3/gunyarapaint/trunk/gunyarapaint/src/gunyarapaint.as (更新) (1 diff)
- as3/gunyarapaint/trunk/gunyarapaint/src/gunyarapaint/Logger.as (更新) (4 diffs)
- as3/gunyarapaint/trunk/nicopedia/gunyarapaint/Com.as (更新) (5 diffs)
- as3/gunyarapaint/trunk/picokakiko/src/picokakiko.as (更新) (1 diff)
- as3/gunyarapaint/trunk/picokakiko/src/picoplayer.mxml (更新) (2 diffs)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/gunyarapaint/trunk/gunyarapaint/src/gunyarapaint.as
r1098 r1099 152 152 if (onPost) { 153 153 onPost = false; 154 if (comm.get HttpStatus() == 202 || comm.getError()) {154 if (comm.getErrorStr()) { 155 155 // error 156 Alert.show(comm.getErrorStr(), ALERT_TITLE); 157 this.enabled = true; 158 } else if (comm.getStringData() != '') { 156 159 Alert.show(comm.getStringData(), ALERT_TITLE); 157 160 this.enabled = true; as3/gunyarapaint/trunk/gunyarapaint/src/gunyarapaint/Logger.as
r1090 r1099 1 1 package gunyarapaint 2 2 { 3 import flash.display.BitmapData; 3 4 import flash.errors.EOFError; 4 5 import flash.utils.ByteArray; 5 import flash.display.BitmapData;6 6 7 7 public class Logger … … 12 12 13 13 private var log:ByteArray; 14 15 private var logCount:uint; 14 16 15 17 private var width:uint, height:uint; … … 139 141 writeByte(ACTION_REDO); 140 142 break; 141 } 143 default: 144 return; 145 } 146 logCount++; 147 } 148 public function getLogCount():uint { 149 return logCount; 142 150 } 143 151 // put byte data … … 264 272 preX = 0; 265 273 preY = 0; 274 logCount = 0; 266 275 } 267 276 public function compress():void { as3/gunyarapaint/trunk/nicopedia/gunyarapaint/Com.as
r1090 r1099 29 29 private var urlLoader:URLLoader; 30 30 private var loader:Loader; 31 private var httpStatus:int;32 31 33 private var error :Boolean;32 private var errorStr:String; 34 33 35 34 public function Com() … … 117 116 118 117 private function post(request:URLRequest):void { 119 error = false;118 errorStr = null; 120 119 urlLoader = new URLLoader(); 121 120 urlLoader.dataFormat = URLLoaderDataFormat.BINARY; … … 138 137 139 138 private function configureListeners(dispatcher:IEventDispatcher):void { 140 dispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, postHttpStatusHandler);139 // dispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, postHttpStatusHandler); 141 140 dispatcher.addEventListener(SecurityErrorEvent.SECURITY_ERROR, postSecurityErrorHandler); 142 141 dispatcher.addEventListener(IOErrorEvent.IO_ERROR, postIOErrorHandler); … … 147 146 148 147 private function postSecurityErrorHandler(evt:SecurityErrorEvent):void { 149 error = true; 150 Alert.show(evt.text, 'セキュリティエラーが発生しました。'); 148 errorStr = 'セキュリティエラーが発生しました。\n詳細:' + evt.text; 151 149 dispatchEvent(new Event('completeGetData')); 152 150 } 153 151 private function postIOErrorHandler(evt:IOErrorEvent):void { 154 152 // TODO: not event based, see URLLoader help 155 error = true; 156 Alert.show(evt.text, 'ネットワークエラーが発生しました。'); 153 errorStr = 'ネットワークエラーが発生しました。\n詳細:' + evt.text; 157 154 dispatchEvent(new Event('completeGetData')); 158 155 } 159 156 private function postOpenHandler(evt:Event):void { 160 }161 private function postHttpStatusHandler(evt:HTTPStatusEvent):void {162 dispatchEvent(new Event('httpStatus'));163 httpStatus = evt.status;164 157 } 165 158 private function postProgressHandler(evt:ProgressEvent):void { … … 178 171 return loader.content; 179 172 } 180 public function getHttpStatus():int { 181 return httpStatus; 182 } 183 public function getError():Boolean { 184 return error; 173 public function getErrorStr():String { 174 return errorStr; 185 175 } 186 176 } as3/gunyarapaint/trunk/picokakiko/src/picokakiko.as
r1094 r1099 49 49 if (onPost) { 50 50 onPost = false; 51 if (comm.get HttpStatus() == 202 || comm.getError()) {51 if (comm.getErrorStr()) { 52 52 // error 53 Alert.show(comm.getErrorStr(), ALERT_TITLE); 54 postPicoButton.enabled = true; 55 } else if (comm.getStringData()) { 53 56 Alert.show(comm.getStringData(), ALERT_TITLE); 54 postPicoButton.enabled = true; 57 postPicoButton.enabled = true; 55 58 } else { 56 59 // redirect as3/gunyarapaint/trunk/picokakiko/src/picoplayer.mxml
r1092 r1099 3 3 xmlns:flmml="com.txt_nifty.sketch.flmml.*" 4 4 creationComplete="init()" 5 layout="absolute" width="309" height=" 43" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#FFFFFF, #FFFFFF]" color="#222222">6 <mx:Button id="playButton" x="10" y=" 10" label="ピコ再生" width="73" enabled="false" color="#444444"/>7 <mx:Button id="stopButton" x=" 91" y="10" label="ピコ停止" enabled="false"/>8 <mx:Button id="postPicoButton" x=" 166" y="10" label="元ネタにしてピコカキコ" enabled="false"/>5 layout="absolute" width="309" height="139" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#FFFFFF, #FFFFFF]" color="#222222"> 6 <mx:Button id="playButton" x="10" y="40" label="ピコ再生" width="120" enabled="false" color="#444444" fontSize="20"/> 7 <mx:Button id="stopButton" x="180" y="40" label="ピコ停止" enabled="false" fontSize="20" width="119"/> 8 <mx:Button id="postPicoButton" x="41" y="94" label="元ネタにしてピコカキコ" enabled="false" fontSize="20"/> 9 9 <flmml:FlMML id="mml_player"/> 10 10 … … 74 74 ]]> 75 75 </mx:Script> 76 <mx:Label x="10" y="10" text="ピコカキコプレーヤ" fontSize="14"/> 77 <mx:Label x="203" y="14" text="ver.2008040701"/> 76 78 </mx:Application>

