チェンジセット 199: as3/as3Query

差分発生行の前後
無視リスト:
コミット日時:
2008/01/14 01:20:06 (1 年前)
コミッタ:
nitoyon
ログメッセージ:

add comments

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • as3/as3Query/samples/Box25.as

    r198 r199  
    1313                        }); 
    1414 
     15                        // create 25 boxes 
    1516                        for(var i:int = 0; i < 25; i++) { 
    16                                 $(RoundRect) 
    17                                         .attr({ 
     17                                $(RoundRect)   // $(ClassName) equals $(new ClassName()) 
     18                                        .attr({    // Set properties 
    1819                                                x: (i % 5) * 50, 
    1920                                                y: Math.floor(i / 5) * 50, 
     
    2425                        } 
    2526 
     27                        // add enterFrame event handler 
    2628                        $(stage).enterFrame(function(event:Event):void { 
    2729                                $("RoundRect").attr("color", function(...args):uint { 
  • as3/as3Query/samples/Box25withTweener.as

    r198 r199  
    1515                        }); 
    1616 
     17                        // create 25 boxes 
    1718                        for(var i:int = 0; i < 25; i++) { 
    18                                 $(RoundRect) 
    19                                         .attr({ 
    20                                                 x: (i % 5) * 60 + 50, 
    21                                                 y: Math.floor(i / 5) * 60 + 50, 
    22                                                 width: 50, 
    23                                                 height: 50, 
    24                                                 centered: true 
     19                                $(RoundRect)   // $(ClassName) equals $(new ClassName()) 
     20                                        .attr({    // Set properties 
     21                                                x: (i % 5) * 50, 
     22                                                y: Math.floor(i / 5) * 50, 
     23                                                width: 40, 
     24                                                height: 40 
    2525                                        }) 
    2626                                        .appendTo(this); 
     
    2828 
    2929                        function animate(f:Boolean):void { 
     30                                // Select 'RoundRect' elements using CSS selector 
    3031                                $("RoundRect:" + (f ? "odd" : "even")) 
    3132                                        .addTween({ 
     
    4445                                                transition: "easeOutElastic", 
    4546                                                onComplete: function():void { 
     47                                                        // restore the rotation and call again. 
    4648                                                        this.rotation = 0; 
    4749                                                        animate(!f);