チェンジセット 1604

差分発生行の前後
無視リスト:
コミット日時:
2008/10/13 02:09:38 (3 ヶ月前)
コミッタ:
n_mattun
ログメッセージ:

Lineコンポーネント更新。

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • mxp/Line/src/Line.as

    r1513 r1604  
    2121                 
    2222                public function Line(){ 
    23                         //描画用sprとマスク用sprを宣言 
     23                        var _vw:Number = 0; 
     24                        var _vh:Number = 0; 
     25                        //ASのnewで生成されたかタイムライン上の配置で生成されたかを判別する 
     26                        if(this.parent == null){ 
     27                                //親がnull = まだaddChildされてない = newで生成された 
     28                                _vw = __w; 
     29                                _vh = __h; 
     30                        }else{ 
     31                                //親がnull以外 = コンストラクタ前の時点でaddChildされてる = タイムラインで生成された 
     32                                _vw = (super.width  == 0) ? __w:super.width; 
     33                                _vh = (super.height == 0) ? __h:super.height; 
     34                                scaleX = 1;//scaleは1に戻しておく 
     35                                scaleY = 1;//scaleは1に戻しておく 
     36                                //初回のサイズ取得に使った透明塗りの大きさを0にしたあと消してしまう 
     37                                var tmp_Shape:* = getChildAt(0); 
     38                                tmp_Shape.width  = 0; 
     39                                tmp_Shape.height = 0; 
     40                                tmp_Shape.visible = false; 
     41                                removeChild(tmp_Shape); 
     42                        } 
     43                         
     44                        //描画用sprとマスク用sprを生成 
    2445                        mask_spr = new Sprite(); 
    2546                        body_spr = new Sprite(); 
     
    2849                        //マスクを実装 
    2950                        this.body_spr.mask = this.mask_spr; 
    30                          
     51 
    3152                        //whを取得したのちscale値を元に戻す 
    32                         this.__w = super.width
    33                         this.__h = super.height
     53                        this.__w = _vw
     54                        this.__h = _vh
    3455                        this.alpha      = __alpha; 
    35                         this.scaleX = 1; 
    36                         this.scaleY = 1; 
     56                         
    3757                        this.width  = __w; 
    3858                        this.height = __h; 
     
    6080                } 
    6181                // -------------------------------------------------------------------// 
    62                 [Inspectable(defaultValue=0x000000, name="01.色", type="Color")] 
     82                [Inspectable(defaultValue="#000000", name="01.色", type="Color")] 
    6383                public function set color(_num:uint):void{ 
    6484                        __color = _num;