チェンジセット 1450
- コミット日時:
- 2008/09/30 03:24:33 (3 ヶ月前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
mxp/specialbutton/as3/src/ButtonBox.as
r1449 r1450 22 22 public var __toColor :uint = 0xCCCCCC; 23 23 public var __colorType :String = "グラデ上→下"; 24 public var __outerAlpha :Number = 100; 25 public var __innerAlpha :Number = 100; 26 public var __bodyAlpha :Number = 100; 24 27 25 28 public function ButtonBox() { … … 41 44 this.colorType = __colorType; 42 45 this.innerPosition = __innerPosition; 46 this.outerAlpha = __outerAlpha; 47 this.innerAlpha = __innerAlpha; 48 this.bodyAlpha = __bodyAlpha; 43 49 } 44 50 // -------------------------------------------------------------------// … … 63 69 } 64 70 // -------------------------------------------------------------------// 65 //[Inspectable(defaultValue=5, name="01.cornerSize", type="Number")]66 71 [Inspectable(defaultValue=5, name="01.角の丸み", type="Number")] 67 72 public function set cornerSize(_num:Number):void { … … 72 77 } 73 78 // -------------------------------------------------------------------// 74 //[Inspectable(defaultValue=2, name="02.outerSize", type="Number")]75 79 [Inspectable(defaultValue=2, name="02.線の太さ(下)", type="Number")] 76 80 public function set outerSize(_num:Number):void { … … 80 84 } 81 85 // -------------------------------------------------------------------// 82 //[Inspectable(defaultValue=1, name="03.innerSize", type="Number")]83 86 [Inspectable(defaultValue=1, name="03.線の太さ(上)", type="Number")] 84 87 public function set innerSize(_num:Number):void { … … 88 91 } 89 92 // -------------------------------------------------------------------// 90 //[Inspectable(defaultValue="All", name="04.cornerPart", type="List", enumeration="All,Top,Bottom,Left,Right,LT,LB,RT,RB,None")]91 93 [Inspectable(defaultValue="All", name="04.角の丸め位置", type="List", enumeration="All,Top,Bottom,Left,Right,LT,LB,RT,RB,None")] 92 94 public function set cornerPart(_str:String):void { … … 97 99 } 98 100 // -------------------------------------------------------------------// 99 //[Inspectable(defaultValue="内側", name="05.innerPosition", type="List", enumeration="内側,中央,外側")]100 101 [Inspectable(defaultValue="内側", name="05.境界線(上)の位置", type="List", enumeration="内側,中央,外側")] 101 102 public function set innerPosition(_str:String):void { … … 132 133 } 133 134 // -------------------------------------------------------------------// 134 //[Inspectable(defaultValue="#000000", name="06.outerColor", type="Color")]135 135 [Inspectable(defaultValue="#000000", name="06.境界線(下)の色", type="Color")] 136 136 public function set outerColor(_num:uint):void { … … 139 139 } 140 140 // -------------------------------------------------------------------// 141 //[Inspectable(defaultValue="#999999", name="07.innerColor", type="Color")]142 141 [Inspectable(defaultValue="#999999", name="07.境界線(上)の色", type="Color")] 143 142 public function set innerColor(_num:uint):void { … … 146 145 } 147 146 // -------------------------------------------------------------------// 148 //[Inspectable(defaultValue="#FFFFFF", name="08.stColor", type="Color")]149 147 [Inspectable(defaultValue="#FFFFFF", name="08.塗りの始点色", type="Color")] 150 148 public function set stColor(_num:uint):void { … … 153 151 } 154 152 // -------------------------------------------------------------------// 155 //[Inspectable(defaultValue="#CCCCCC", name="09.toColor", type="Color")]156 153 [Inspectable(defaultValue="#CCCCCC", name="09.塗りの終点色", type="Color")] 157 154 public function set toColor(_num:uint):void { … … 160 157 } 161 158 // -------------------------------------------------------------------// 162 //[Inspectable(defaultValue="グラデ上→下", name="10.colorType", type="List", enumeration="グラデ内→外,グラデ上→下,グラデ左上→右下,グラデ左下→右上,グラデ左→右,単一色")]163 159 [Inspectable(defaultValue="グラデ上→下", name="10.塗りのパターン", type="List", enumeration="グラデ内→外,グラデ上→下,グラデ左上→右下,グラデ左下→右上,グラデ左→右,単一色")] 164 160 public function set colorType(_str:String):void { … … 167 163 } 168 164 // -------------------------------------------------------------------// 165 [Inspectable(defaultValue=100, name="11.境界線(下)の透明度", type="Number")] 166 public function set outerAlpha(_num:Number):void { 167 __outerAlpha = _num; 168 outer.alpha = _num; 169 } 170 // -------------------------------------------------------------------// 171 [Inspectable(defaultValue=100, name="12.境界線(上)の透明度", type="Number")] 172 public function set innerAlpha(_num:Number):void { 173 __innerAlpha = _num; 174 inner.alpha = _num; 175 } 176 // -------------------------------------------------------------------// 177 [Inspectable(defaultValue=100, name="13.塗りの透明度", type="Number")] 178 public function set bodyAlpha(_num:Number):void { 179 __bodyAlpha = _num; 180 body_mc.alpha = _num; 181 } 182 // -------------------------------------------------------------------// 169 183 // getter 170 184 // -------------------------------------------------------------------// … … 215 229 public function get colorType():String { 216 230 return __colorType; 231 } 232 // -------------------------------------------------------------------// 233 public function get outerAlpha():Number { 234 return __outerAlpha; 235 } 236 // -------------------------------------------------------------------// 237 public function get innerAlpha():Number { 238 return __innerAlpha; 239 } 240 // -------------------------------------------------------------------// 241 public function get bodyAlpha():Number { 242 return __bodyAlpha; 217 243 } 218 244 // -------------------------------------------------------------------// mxp/specialbutton/as3/src/ButtonBox_body.as
r1449 r1450 16 16 public function ButtonBox_body(){ 17 17 //whを取得したのちscale値を元に戻す 18 trace(super.width,super.height);19 18 this.__w = super.width; 20 19 this.__h = super.height; mxp/specialbutton/as3/src/buttonBox_Labels.as
r1449 r1450 126 126 // -------------------------------------------------------------------// 127 127 public function set label(_obj:*):void { 128 switch(typeof(_obj)){ 129 case "string": 130 if(__labelType == "テキスト") __textLabel = _obj; 131 if(__labelType == "外部テキスト") __textURL = _obj; 132 if(__labelType == "リンケージMC") __imageID = _obj; 133 if(__labelType == "外部画像") __imageURL = _obj; 134 break; 135 case "object": 136 if(__labelType == "リンケージMC付きテキスト"){ 137 __textLabel = _obj[0]; 138 __imageID = _obj[1]; 139 } 140 if(__labelType == "外部外部画像付きテキスト"){ 141 __textLabel = _obj[0]; 142 __imageURL = _obj[1]; 143 } 144 if(__labelType == "リンケージMC付き外部テキスト"){ 145 __textURL = _obj[0]; 146 __imageID = _obj[1]; 147 } 148 if(__labelType == "外部画像付き外部テキスト"){ 149 __textURL = _obj[0]; 150 __imageURL = _obj[1]; 151 } 152 break; 128 if((_obj as String) != null){ 129 if(__labelType == "テキスト") __textLabel = _obj; 130 if(__labelType == "外部テキスト") __textURL = _obj; 131 if(__labelType == "リンケージMC") __imageID = _obj; 132 if(__labelType == "外部画像") __imageURL = _obj; 133 }else if((_obj as Array) != null){ 134 if(__labelType == "リンケージMC付きテキスト"){ 135 __textLabel = _obj[0]; 136 __imageID = _obj[1]; 137 } 138 if(__labelType == "外部外部画像付きテキスト"){ 139 __textLabel = _obj[0]; 140 __imageURL = _obj[1]; 141 } 142 if(__labelType == "リンケージMC付き外部テキスト"){ 143 __textURL = _obj[0]; 144 __imageID = _obj[1]; 145 } 146 if(__labelType == "外部画像付き外部テキスト"){ 147 __textURL = _obj[0]; 148 __imageURL = _obj[1]; 149 } 150 }else if((_obj as Object) != null){ 151 try { 152 for(var i in _obj) this[i] = _obj[i]; 153 } catch (e:Error) { 154 //不正なプロパティ名が来る場合があるのでtry/catchしておく 155 } 153 156 } 154 157 labelType = __labelType; mxp/specialbutton/as3/src/buttonBox_textLabels.as
r1449 r1450 11 11 public class buttonBox_textLabels extends Sprite { 12 12 13 public var __w :Number = 1 00;13 public var __w :Number = 16; 14 14 public var __h :Number = 16; 15 15 public var __label :String = ""; … … 134 134 // -------------------------------------------------------------------// 135 135 private function updateText() { 136 trace("updateText"); 136 137 var _hMargin = (__leading*2+__size); 137 138
