チェンジセット 3731

差分発生行の前後
無視リスト:
コミット日時:
2010/04/09 02:20:55 (3 年前)
コミッタ:
hkrn
ログメッセージ:

removed onPreinitialize and its process to onApplicationComplete

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • as3/gunyarapaint/branches/gunyarapaint/compat/src/gunyarapaint.mxml

    r3696 r3731  
    44    xmlns:ui="org.libspark.gunyarapaint.ui.v1.*" 
    55    layout="absolute" width="100%" height="100%" 
    6     preinitialize="onPreinitialize(event)" 
    76    applicationComplete="onApplicationComplete(event)" 
    87    removedFromStage="onRemove(event)" 
     
    195194            } 
    196195             
    197             private function onPreinitialize(event:FlexEvent):void 
    198             { 
     196            private function onApplicationComplete(event:FlexEvent):void 
     197            { 
     198                var width:int = int(parameters["canvasWidth"]); 
     199                var height:int = int(parameters["canvasHeight"]); 
     200                var undoBufferSize:uint = int(parameters["undoBufferSize"]); 
    199201                if (DEBUG) { 
    200                     /* 
    201                     parameters["oekakiId"] = 23724; 
    202                     parameters["baseImgUrl"] = "http://dic.nicovideo.jp/oekaki_layers/23724"; 
    203                     parameters["baseImgInfoUrl"] = "http://dic.nicovideo.jp/oekaki_info/23724"; 
    204                     */ 
    205202                    parameters["postUrl"] = "http://dic.dev.nicovideo.jp/"; 
    206203                    parameters["cookie"] = "cookie"; 
    207204                    parameters["magic"] = "magic"; 
    208205                    parameters["redirectUrl"] = "http://dic.dev.nicovideo.jp/"; 
    209                     parameters["undoBufferSize"] = 16
    210                     parameters["canvasWidth"] = 417; 
    211                     parameters["canvasHeight"] = 317
    212                 } 
    213                  
     206                    width ||= 317
     207                    height ||= 317; 
     208                    undoBufferSize ||= 16
     209                    versionLabel.text += " debug build"; 
     210                } 
    214211                if (parameters["postUrl"] && 
    215212                    parameters["cookie"] && 
     
    219216                    redirectUrl = parameters["redirectUrl"]; 
    220217                } 
    221             } 
    222              
    223             private function onApplicationComplete(event:FlexEvent):void 
    224             { 
    225                 if (DEBUG) { 
    226                     // debug buttons 
    227                     //logPlayButton.addEventListener(FlexEvent.BUTTON_DOWN, playLogHandler); 
    228                     versionLabel.text += " debug build"; 
    229                     //logPlayButton.visible = true; 
    230                     //checkPngButton.visible = true; 
    231                 }                 
    232                 var width:uint = 0; 
    233                 var height:uint = 0; 
    234                 var undoBufferSize:uint = 0; 
    235                 undoBufferSize = int(parameters["undoBufferSize"]); 
    236218                if (undoBufferSize < 0) { 
    237219                    Alert.show("最大アンドゥ回数が少なすぎます。", ALERT_TITLE);    
     
    249231                } 
    250232                else { 
    251                     width = int(parameters["canvasWidth"]); 
    252                     height = int(parameters["canvasHeight"]); 
    253233                    if (width < MIN_CANVAS_WIDTH || height < MIN_CANVAS_HEIGHT) { 
    254234                        Alert.show("キャンバスサイズが小さすぎます。", ALERT_TITLE); 
     
    299279            private function onCommit(event:CommandEvent):void 
    300280            { 
    301                 trace(event.command); 
     281                //trace(event.command); 
    302282                m_commit++; 
    303283            }