チェンジセット 199: as3/as3Query
- コミット日時:
- 2008/01/14 01:20:06 (1 年前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/as3Query/samples/Box25.as
r198 r199 13 13 }); 14 14 15 // create 25 boxes 15 16 for(var i:int = 0; i < 25; i++) { 16 $(RoundRect) 17 .attr({ 17 $(RoundRect) // $(ClassName) equals $(new ClassName()) 18 .attr({ // Set properties 18 19 x: (i % 5) * 50, 19 20 y: Math.floor(i / 5) * 50, … … 24 25 } 25 26 27 // add enterFrame event handler 26 28 $(stage).enterFrame(function(event:Event):void { 27 29 $("RoundRect").attr("color", function(...args):uint { as3/as3Query/samples/Box25withTweener.as
r198 r199 15 15 }); 16 16 17 // create 25 boxes 17 18 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 25 25 }) 26 26 .appendTo(this); … … 28 28 29 29 function animate(f:Boolean):void { 30 // Select 'RoundRect' elements using CSS selector 30 31 $("RoundRect:" + (f ? "odd" : "even")) 31 32 .addTween({ … … 44 45 transition: "easeOutElastic", 45 46 onComplete: function():void { 47 // restore the rotation and call again. 46 48 this.rotation = 0; 47 49 animate(!f);
