チェンジセット 3854
- コミット日時:
- 2010/04/25 00:45:26 (3 年前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/gunyarapaint/branches/gunyarapaint/air/.actionScriptProperties
r3646 r3854 18 18 </compiler> 19 19 <applications> 20 <application path="ParserDelegate.mxml"> 21 <airExcludes/> 22 </application> 20 23 <application path="ApplicationDelegate.mxml"> 21 24 <airExcludes/> 22 25 </application> 23 26 <application path="PlayerDelegate.mxml"> 27 <airExcludes/> 28 </application> 29 <application path="PlayerDelegate2.mxml"> 24 30 <airExcludes/> 25 31 </application> as3/gunyarapaint/branches/gunyarapaint/air/src/PlayerDelegate.mxml
r3686 r3854 27 27 import mx.utils.Base64Decoder; 28 28 29 import org.libspark.gunyarapaint.framework.LayerBitmapCollection; 29 30 import org.libspark.gunyarapaint.framework.Painter; 30 31 import org.libspark.gunyarapaint.framework.Player; 32 import org.libspark.gunyarapaint.framework.commands.ICommand; 31 33 import org.libspark.gunyarapaint.framework.events.CommandEvent; 32 34 import org.libspark.gunyarapaint.framework.events.PlayerEvent; 35 import org.libspark.gunyarapaint.framework.events.UndoEvent; 33 36 34 37 import spark.core.SpriteVisualElement; … … 39 42 var config:File = appDir.resolvePath("config.xml"); 40 43 var stream:FileStream = new FileStream(); 41 m_commands = new Vector.<uint>(64, true); 44 m_commands = new Vector.<uint>(32, true); 45 m_commandStrings = new Vector.<String>(); 42 46 try { 43 47 stream.open(config, FileMode.READ); … … 139 143 private function onParse(event:CommandEvent):void 140 144 { 141 m_commands[event.command.commandID] = event.command.commandID; 145 var command:ICommand = event.command; 146 m_commands[command.commandID] = command.commandID; 147 m_commandStrings.push(command); 142 148 } 143 149 … … 179 185 currentState = "finished"; 180 186 saveImage(); 187 saveLogs(); 181 188 } 182 189 … … 209 216 } 210 217 catch (e:Error) { 211 trace(e);218 Alert.show(e.getStackTrace(), e.message); 212 219 } 213 220 finally { 214 221 bitmap.dispose(); 222 stream.close(); 223 } 224 } 225 226 private function saveLogs():void 227 { 228 var file:File = File.userDirectory.resolvePath(".oekaki/log_player_delegate.txt"); 229 var stream:FileStream = new FileStream(); 230 try { 231 var len:uint = m_commandStrings.length; 232 stream.open(file, FileMode.WRITE); 233 for (var i:uint = 0; i < len; i++) { 234 stream.writeUTFBytes(m_commandStrings[i] + "\n"); 235 } 236 } 237 catch (e:Error) { 238 Alert.show(e.getStackTrace(), e.message); 239 } 240 finally { 215 241 stream.close(); 216 242 } … … 239 265 private var m_params:XMLList; 240 266 private var m_commands:Vector.<uint>; 267 private var m_commandStrings:Vector.<String>; 241 268 ]]> 242 269 </fx:Script>

