チェンジセット 1491
- コミット日時:
- 2008/10/03 03:21:22 (3 ヶ月前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
mxp/specialbutton/as3/src/buttonBox_Labels.as
r1474 r1491 321 321 // private Function 322 322 // -------------------------------------------------------------------// 323 private function updateLabelPosition(){ 323 public function updateLabelPosition(){ 324 325 var txtLabelWidth = txtLabel_mc.label_txt.width+Math.abs(txtLabel_mc.__shadowMargin_x); 326 324 327 if(imgLabel_mc.visible && txtLabel_mc.visible){ 325 328 switch(__imagePosition){ … … 364 367 break; 365 368 case "上中": 366 if(imgLabel_mc.width-txtLabel _mc.width > 0){367 imgLabel_mc.x = 0; 368 imgLabel_mc.y = 0; 369 txtLabel_mc.x = Math.ceil((imgLabel_mc.width-txtLabel _mc.width) / 2);369 if(imgLabel_mc.width-txtLabelWidth > 0){ 370 imgLabel_mc.x = 0; 371 imgLabel_mc.y = 0; 372 txtLabel_mc.x = Math.ceil((imgLabel_mc.width-txtLabelWidth) / 2); 370 373 txtLabel_mc.y = imgLabel_mc.height+__labelMargin; 371 374 }else{ 372 imgLabel_mc.x = Math.ceil((txtLabel _mc.width-imgLabel_mc.width) / 2);375 imgLabel_mc.x = Math.ceil((txtLabelWidth-imgLabel_mc.width) / 2); 373 376 imgLabel_mc.y = 0; 374 377 txtLabel_mc.x = 0; … … 377 380 break; 378 381 case "上右": 379 if(imgLabel_mc.width-txtLabel _mc.width > 0){380 imgLabel_mc.x = 0; 381 imgLabel_mc.y = 0; 382 txtLabel_mc.x = imgLabel_mc.width-txtLabel _mc.width;382 if(imgLabel_mc.width-txtLabelWidth > 0){ 383 imgLabel_mc.x = 0; 384 imgLabel_mc.y = 0; 385 txtLabel_mc.x = imgLabel_mc.width-txtLabelWidth; 383 386 txtLabel_mc.y = imgLabel_mc.height+__labelMargin; 384 387 }else{ 385 imgLabel_mc.x = txtLabel _mc.width-imgLabel_mc.width;388 imgLabel_mc.x = txtLabelWidth-imgLabel_mc.width; 386 389 imgLabel_mc.y = 0; 387 390 txtLabel_mc.x = 0; … … 391 394 // -------------------------------------------------------------------// 392 395 case "右上": 393 imgLabel_mc.x = txtLabel _mc.width+__labelMargin;396 imgLabel_mc.x = txtLabelWidth+__labelMargin; 394 397 imgLabel_mc.y = 0; 395 398 txtLabel_mc.x = 0; … … 398 401 case "右中": 399 402 if(imgLabel_mc.height-txtLabel_mc.height > 0){ 400 imgLabel_mc.x = txtLabel _mc.width+__labelMargin;403 imgLabel_mc.x = txtLabelWidth+__labelMargin; 401 404 imgLabel_mc.y = 0; 402 405 txtLabel_mc.x = 0; 403 406 txtLabel_mc.y = Math.ceil((imgLabel_mc.height-txtLabel_mc.height) / 2); 404 407 }else{ 405 imgLabel_mc.x = txtLabel _mc.width+__labelMargin;408 imgLabel_mc.x = txtLabelWidth+__labelMargin; 406 409 imgLabel_mc.y = Math.ceil((txtLabel_mc.height-imgLabel_mc.height) / 2); 407 410 txtLabel_mc.x = 0; … … 411 414 case "右下": 412 415 if(imgLabel_mc.height-txtLabel_mc.height > 0){ 413 imgLabel_mc.x = txtLabel _mc.width+__labelMargin;416 imgLabel_mc.x = txtLabelWidth+__labelMargin; 414 417 imgLabel_mc.y = 0; 415 418 txtLabel_mc.x = 0; 416 419 txtLabel_mc.y = imgLabel_mc.height-txtLabel_mc.height; 417 420 }else{ 418 imgLabel_mc.x = txtLabel _mc.width+__labelMargin;421 imgLabel_mc.x = txtLabelWidth+__labelMargin; 419 422 imgLabel_mc.y = txtLabel_mc.height-imgLabel_mc.height; 420 423 txtLabel_mc.x = 0; … … 430 433 break; 431 434 case "下中": 432 if(imgLabel_mc.width-txtLabel _mc.width > 0){435 if(imgLabel_mc.width-txtLabelWidth > 0){ 433 436 imgLabel_mc.x = 0; 434 437 imgLabel_mc.y = txtLabel_mc.height+__labelMargin; 435 txtLabel_mc.x = Math.ceil((imgLabel_mc.width-txtLabel _mc.width) / 2);436 txtLabel_mc.y = 0; 437 }else{ 438 imgLabel_mc.x = Math.ceil((txtLabel _mc.width-imgLabel_mc.width) / 2);438 txtLabel_mc.x = Math.ceil((imgLabel_mc.width-txtLabelWidth) / 2); 439 txtLabel_mc.y = 0; 440 }else{ 441 imgLabel_mc.x = Math.ceil((txtLabelWidth-imgLabel_mc.width) / 2); 439 442 imgLabel_mc.y = txtLabel_mc.height+__labelMargin; 440 443 txtLabel_mc.x = 0; … … 443 446 break; 444 447 case "下右": 445 if(imgLabel_mc.width-txtLabel _mc.width > 0){448 if(imgLabel_mc.width-txtLabelWidth > 0){ 446 449 imgLabel_mc.x = 0; 447 450 imgLabel_mc.y = txtLabel_mc.height+__labelMargin; 448 txtLabel_mc.x = imgLabel_mc.width-txtLabel _mc.width;449 txtLabel_mc.y = 0; 450 }else{ 451 imgLabel_mc.x = txtLabel _mc.width-imgLabel_mc.width;451 txtLabel_mc.x = imgLabel_mc.width-txtLabelWidth; 452 txtLabel_mc.y = 0; 453 }else{ 454 imgLabel_mc.x = txtLabelWidth-imgLabel_mc.width; 452 455 imgLabel_mc.y = txtLabel_mc.height+__labelMargin; 453 456 txtLabel_mc.x = 0; mxp/specialbutton/as3/src/buttonBox_textLabels.as
r1474 r1491 83 83 __shadowMargin_x = _nums[0]; 84 84 __shadowMargin_y = _nums[1]; 85 shadow_txt.x = _nums[0]; 86 shadow_txt.y = _nums[1]; 85 86 if(_nums[0] > 0){ 87 shadow_txt.x = _nums[0]; 88 label_txt.x = 0; 89 }else{ 90 shadow_txt.x = 0; 91 label_txt.x = -(_nums[0]); 92 } 93 if(_nums[1] > 0){ 94 shadow_txt.y = _nums[1]; 95 label_txt.y = 0; 96 }else{ 97 shadow_txt.y = 0; 98 label_txt.y = -(_nums[1]); 99 } 87 100 } 88 101 // -------------------------------------------------------------------// … … 155 168 lbl_fmt.size = __size; 156 169 lbl_fmt.color = __labelColor; 170 label_txt.defaultTextFormat = lbl_fmt; 157 171 label_txt.setTextFormat(lbl_fmt); 158 172 //label … … 177 191 sdw_fmt.size = __size; 178 192 sdw_fmt.color = __shadowColor; 193 shadow_txt.defaultTextFormat = sdw_fmt; 179 194 shadow_txt.setTextFormat(sdw_fmt); 180 195 if(__autoSize){ … … 196 211 } 197 212 198 checkBorderLine();213 //checkBorderLine(); 199 214 } 200 215 // -------------------------------------------------------------------// mxp/specialbutton/as3/src/sample.txt
r1449 r1491 1 // 必要なパッケージの読み込み. 2 import flash.utils.getDefinitionByName; 3 import flash.geom.*; 4 import flash.display.MovieClip; 5 import flash.display.Shape; 6 import flash.display.Loader; 7 import flash.events.*; 8 import flash.net.URLRequest; 9 import flash.text.*; 10 import flash.display.GradientType; 11 import flash.display.SpreadMethod; 12 import flash.text.TextFieldAutoSize; 1 2 ■不具合の残りリスト 3 Cornerにアルファが通用していない(ジャスト0はなぜか大丈夫) 4 Cornerに矛盾が発生するデカい値を入れるとCornerがはみ出して表示される 5 6 7 ■これから実装するもの 8 up/over/dowm/disable時のviewまわり
