チェンジセット 1522
- コミット日時:
- 2008/10/05 18:42:03 (3 ヶ月前)
- ファイル:
-
- mxp/specialbutton/as3/src/AC_RunActiveContent.js (追加)
- mxp/specialbutton/as3/src/BorderBox.as (更新) (9 diffs)
- mxp/specialbutton/as3/src/BorderBox.fla (更新) (変更前)
- mxp/specialbutton/as3/src/BorderBox.swf (更新) (変更前)
- mxp/specialbutton/as3/src/BorderBox_sample.fla (更新) (変更前)
- mxp/specialbutton/as3/src/BorderBox_sample.swf (更新) (変更前)
- mxp/specialbutton/as3/src/ButtonBox.as (更新) (4 diffs)
- mxp/specialbutton/as3/src/Corner_sample.fla (更新) (変更前)
- mxp/specialbutton/as3/src/Corner_sample.swf (更新) (変更前)
- mxp/specialbutton/as3/src/SpecialButton.as (追加)
- mxp/specialbutton/as3/src/SpecialButton_sample.fla (追加)
- mxp/specialbutton/as3/src/SpecialButton_sample.html (追加)
- mxp/specialbutton/as3/src/SpecialButton_sample.swf (追加)
- mxp/specialbutton/as3/src/buttonBox_Labels.as (更新) (3 diffs)
- mxp/specialbutton/as3/src/buttonBox_textLabels.as (更新) (2 diffs)
- mxp/specialbutton/as3/src/sample.txt (更新) (1 diff)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
mxp/specialbutton/as3/src/BorderBox.as
r1449 r1522 42 42 public var __w :Number = 80; 43 43 public var __h :Number = 20; 44 public var __alpha :Number = 1; 44 45 public var __color :uint = 0x000000; 45 46 public var __cornerSize :Number = 5; … … 51 52 public function BorderBox(){ 52 53 //whを取得したのちscale値を元に戻す 53 this.__w = super.width; 54 this.__h = super.height; 54 var _rw = super.width; 55 var _rh = super.height; 56 this.__w = Math.floor(_rw); 57 this.__h = _rh; 55 58 this.scaleX = 1; 56 59 this.scaleY = 1; 57 this.setCornerPart(__cornerPart); 58 this.setWidth(__w); 59 this.setHeight(__h); 60 this.setColor(__color); 61 } 62 // ===================================================================// 63 // コンポーネント定数からの変更を反映させるsetter/getter 64 // ===================================================================// 60 this.cornerPart = __cornerPart; 61 this.width = __w; 62 this.height = __h; 63 this.color = __color; 64 this.borderSize = __borderSize; 65 } 66 // -------------------------------------------------------------------// 67 // setter 68 // -------------------------------------------------------------------// 65 69 [Inspectable(defaultValue="#000000", name="01.色", type="Color")] 66 70 public function set color(_num:uint){ 67 setColor(_num); 68 } 69 public function get color():uint{ 70 return __color; 71 } 72 // -------------------------------------------------------------------// 73 [Inspectable(defaultValue=5, name="02.角の丸み", type="Number")] 74 public function set cornerSize(_num:Number){ 75 setCornerSize(_num); 76 } 77 public function get cornerSize():Number{ 78 return __cornerSize; 79 } 80 // -------------------------------------------------------------------// 81 [Inspectable(defaultValue=2, name="03.線の太さ", type="Number")] 82 public function set borderSize(_num:Number){ 83 setBorderSize(_num); 84 } 85 public function get borderSize():Number{ 86 return __borderSize; 87 } 88 // -------------------------------------------------------------------// 89 [Inspectable(defaultValue="All", name="04.角の丸め位置", type="List", enumeration="All,Top,Bottom,Left,Right,LT,LB,RT,RB,None")] 90 public function set cornerPart(_str:String){ 91 setCornerPart(_str); 92 } 93 public function get cornerPart():String{ 94 return __cornerPart; 95 } 96 // ===================================================================// 97 // width/heightのオーバーライド 98 // ===================================================================// 99 public override function get width():Number{ 100 return __w; 101 } 71 __color = _num; 72 var _objs:Array = ["LT","RT","LB","RB","T","B","L","R"]; 73 for(var i=0;i < _objs.length;i++){ 74 var colorTransform:ColorTransform = this[_objs[i]].transform.colorTransform; 75 colorTransform.color = _num; 76 this[_objs[i]].transform.colorTransform = colorTransform; 77 } 78 } 79 // -------------------------------------------------------------------// 102 80 public override function set width(_num:Number):void{ 103 //super.width = _num;//superで元のwidthの挙動をさせておく(不要っぽい)104 setWidth(_num);105 }106 // -------------------------------------------------------------------//107 public override function get height():Number{108 return __h;109 }110 // -------------------------------------------------------------------//111 public override function set height(_num:Number):void{112 //super.height = _num;//superで元のheightの挙動をさせておく(不要っぽい)113 setHeight(_num);114 }115 // ===================================================================//116 // 通常のgetter/setter117 // ===================================================================//118 // getter119 // -------------------------------------------------------------------//120 public function getWidth():Number{121 return this.__w;122 }123 // -------------------------------------------------------------------//124 public function getHeight():Number{125 return this.__h;126 }127 // -------------------------------------------------------------------//128 public function getColor():uint{129 return this.__color;130 }131 // -------------------------------------------------------------------//132 public function getCornerSize():Number{133 return this.__cornerSize;134 }135 // -------------------------------------------------------------------//136 public function getBorderSize():Number{137 return this.__borderSize;138 }139 // -------------------------------------------------------------------//140 public function getCornerPart():String{141 return this.__cornerPart;142 }143 // -------------------------------------------------------------------//144 // setter145 // -------------------------------------------------------------------//146 public function setWidth(_num:Number){147 81 // 設定値と角の丸みに矛盾が出る場合は丸みを補正する 148 82 if (__cornerSize*2 > _num) { 149 this. setCornerSize(_num/2);83 this.cornerSize = _num/2; 150 84 } 151 85 this.__w = _num; … … 155 89 this["RT"].x = _num-__cornerSize; 156 90 this["RB"].x = _num-__cornerSize; 157 this.setCornerSize(__cornerSize);158 } 159 // -------------------------------------------------------------------// 160 public function setHeight(_num:Number){91 cornerSize = __cornerSize; 92 } 93 // -------------------------------------------------------------------// 94 public override function set height(_num:Number):void{ 161 95 // 設定値と角の丸みに矛盾が出る場合は丸みを補正する 162 96 if (__cornerSize*2 > _num) { 163 this. setCornerSize(_num/2);97 this.cornerSize = _num/2; 164 98 } 165 99 this.__h = _num; … … 167 101 this["R"].height = _num-(__cornerSize*2); 168 102 this["B"].y = _num; 169 this["LB"].y = this["L"]._height+this["L"].y; 170 this["RB"].y = this["R"]._height+this["R"].y; 171 this.setCornerSize(__cornerSize); 172 } 173 // -------------------------------------------------------------------// 174 public function setColor(_num:uint){ 175 __color = _num; 176 var _objs:Array = ["LT","RT","LB","RB","T","B","L","R"]; 177 for(var i=0;i < _objs.length;i++){ 178 var colorTransform:ColorTransform = this[_objs[i]].transform.colorTransform; 179 colorTransform.color = _num; 180 this[_objs[i]].transform.colorTransform = colorTransform; 181 } 182 } 183 // -------------------------------------------------------------------// 184 public function setCornerSize(_num:Number){ 103 this["LB"].y = this["L"].height+this["L"].y; 104 this["RB"].y = this["R"].height+this["R"].y; 105 this.cornerSize = __cornerSize; 106 } 107 // -------------------------------------------------------------------// 108 [Inspectable(defaultValue=5, name="02.角の丸み", type="Number")] 109 public function set cornerSize(_num:Number){ 185 110 186 111 // 設定値と角の丸みに矛盾が出る場合は適正値に戻す … … 198 123 this["LT"].x = _num; 199 124 this["LT"].y = _num; 200 this["RT"].x = this.getWidth()-_num;125 this["RT"].x = __w-_num; 201 126 this["RT"].y = _num; 202 127 this["LB"].x = _num; 203 this["LB"].y = this.getHeight()-_num;204 this["RB"].x = this.getWidth()-_num;205 this["RB"].y = this.getHeight()-_num;128 this["LB"].y = __h-_num; 129 this["RB"].x = __w-_num; 130 this["RB"].y = __h-_num; 206 131 this["LT"].visible = __cornerPartEnabled.LT; 207 132 this["RT"].visible = __cornerPartEnabled.RT; … … 210 135 this["T"].x = 0; 211 136 this["B"].x = 0; 212 this["T"].width = this.getWidth(); 213 this["B"].width = this.getWidth(); 137 this["T"].width = this.width; 138 this["B"].width = this.width; 139 this["L"].x = 0; 214 140 this["L"].y = 0; 215 141 this["R"].y = 0; 216 this["L"].height = this. getHeight();217 this["R"].height = this. getHeight();142 this["L"].height = this.height; 143 this["R"].height = this.height; 218 144 if(__cornerPartEnabled.LT){ 219 145 this["L"].height-= _num; … … 238 164 } 239 165 // -------------------------------------------------------------------// 240 public function setBorderSize(_num:Number){ 166 [Inspectable(defaultValue=2, name="03.線の太さ", type="Number")] 167 public function set borderSize(_num:Number){ 241 168 // 設定値と角の丸みに矛盾が出る場合は適正値に戻す 242 169 var _max = (this.__w > this.__h) ? this.__h:this.__w; … … 253 180 this["T"].height = _num; 254 181 this["B"].height = _num; 255 this. setCornerSize(__cornerSize);256 257 //BorderSizeが0(非表示)の場合は四つ角 のalpha値を0にしておく182 this.cornerSize = __cornerSize; 183 184 //BorderSizeが0(非表示)の場合は四つ角を非表示にしておく 258 185 if(_num == 0){ 259 this["LT"]. alpha = 0;260 this["RT"]. alpha = 0;261 this["LB"]. alpha = 0;262 this["RB"]. alpha = 0;186 this["LT"].visible = false; 187 this["RT"].visible = false; 188 this["LB"].visible = false; 189 this["RB"].visible = false; 263 190 }else{ 264 this["LT"].alpha = 100; 265 this["RT"].alpha = 100; 266 this["LB"].alpha = 100; 267 this["RB"].alpha = 100; 268 } 269 } 270 // -------------------------------------------------------------------// 271 public function setCornerPart(_str:String) { 191 this["LT"].visible = true; 192 this["RT"].visible = true; 193 this["LB"].visible = true; 194 this["RB"].visible = true; 195 } 196 } 197 // -------------------------------------------------------------------// 198 [Inspectable(defaultValue="All", name="04.角の丸め位置", type="List", enumeration="All,Top,Bottom,Left,Right,LT,LB,RT,RB,None")] 199 public function set cornerPart(_str:String) { 272 200 this.__cornerPart = _str; 273 201 this.__cornerPartEnabled = new Object(); … … 334 262 break; 335 263 } 336 this.setCornerSize(__cornerSize); 264 this.cornerSize = __cornerSize; 265 } 266 // ===================================================================// 267 // getter 268 // ===================================================================// 269 public override function get width():Number{ 270 return __w; 271 } 272 // -------------------------------------------------------------------// 273 public override function get height():Number{ 274 return __h; 275 } 276 // -------------------------------------------------------------------// 277 public function get color():uint{ 278 return this.__color; 279 } 280 // -------------------------------------------------------------------// 281 public function get cornerSize():Number{ 282 return this.__cornerSize; 283 } 284 // -------------------------------------------------------------------// 285 public function get borderSize():Number{ 286 return this.__borderSize; 287 } 288 // -------------------------------------------------------------------// 289 public function get cornerPart():String{ 290 return this.__cornerPart; 337 291 } 338 292 // -------------------------------------------------------------------// mxp/specialbutton/as3/src/ButtonBox.as
r1450 r1522 55 55 outer.width = __w; 56 56 inner.width = __w-(__outerSize); 57 mask_mc.width = __w ;57 mask_mc.width = __w-(__outerSize*2); 58 58 body_mc.width = __w-(__outerSize*2); 59 59 body_mc.x = __outerSize; 60 cornerSize = __cornerSize; 60 61 } 61 62 // -------------------------------------------------------------------// … … 64 65 outer.height = __h; 65 66 inner.height = __h-(__outerSize); 66 mask_mc.height = __h ;67 mask_mc.height = __h-(__outerSize*2); 67 68 body_mc.height = __h-(__outerSize*2); 68 69 body_mc.y = __outerSize; 70 cornerSize = __cornerSize; 69 71 } 70 72 // -------------------------------------------------------------------// … … 74 76 outer.cornerSize = _num; 75 77 inner.cornerSize = _num-(__outerSize/2); 76 mask_mc.cornerSize = _num; 78 outerSize = __outerSize; 79 mask_mc.cornerSize = _num-(__outerSize); 80 mask_mc.cornerPart = "All"; 81 mask_mc.cornerPart = __cornerPart; 77 82 } 78 83 // -------------------------------------------------------------------// … … 82 87 outer.borderSize = _num; 83 88 innerPosition = __innerPosition; 89 90 mask_mc.x = _num; 91 mask_mc.y = _num; 92 mask_mc.width = __w-(outer.borderSize*2); 93 mask_mc.height = __h-(outer.borderSize*2); 94 mask_mc.cornerSize = cornerSize-(_num); 95 mask_mc.cornerPart = "All"; 96 mask_mc.cornerPart = __cornerPart; 84 97 } 85 98 // -------------------------------------------------------------------// mxp/specialbutton/as3/src/buttonBox_Labels.as
r1491 r1522 27 27 public var __bold :Boolean = false; 28 28 public var __italic :Boolean = false; 29 public var __underline :Boolean = false; 29 30 public var __shadowMargin_x :Number = 1; 30 31 public var __shadowMargin_y :Number = 1; … … 203 204 } 204 205 // -------------------------------------------------------------------// 206 public function set underline(_bool:Boolean):void { 207 txtLabel_mc.underline = _bool; 208 } 209 // -------------------------------------------------------------------// 205 210 public function set shadowMargin(_nums:Array) { 206 211 txtLabel_mc.shadowMargin = _nums; … … 292 297 public function get italic():Boolean { 293 298 return txtLabel_mc.italic; 299 } 300 // -------------------------------------------------------------------// 301 public function get underline():Boolean { 302 return txtLabel_mc.underline; 294 303 } 295 304 // -------------------------------------------------------------------// mxp/specialbutton/as3/src/buttonBox_textLabels.as
r1491 r1522 80 80 } 81 81 // -------------------------------------------------------------------// 82 public function set underline(_bool:Boolean):void { 83 __underline = _bool; 84 updateText(); 85 } 86 // -------------------------------------------------------------------// 82 87 public function set shadowMargin(_nums:Array) { 83 88 __shadowMargin_x = _nums[0]; … … 141 146 public function get italic():Boolean { 142 147 return __italic; 148 } 149 // -------------------------------------------------------------------// 150 public function get underline():Boolean { 151 return __underline; 143 152 } 144 153 // -------------------------------------------------------------------// mxp/specialbutton/as3/src/sample.txt
r1491 r1522 1 1 2 2 ■不具合の残りリスト 3 Cornerにアルファが通用していない(ジャスト0はなぜか大丈夫) 4 Cornerに矛盾が発生するデカい値を入れるとCornerがはみ出して表示される 3 Cornerにアルファが通用していない(ジャスト0はなぜか大丈夫) 〆 4 Cornerに矛盾が発生するデカい値を入れるとCornerがはみ出して表示される 〆 5 5 6 6
