flash on 2015-2-20
♥0 |
Line 26 |
Modified 2015-02-20 21:57:19 |
MIT License
archived:2017-03-20 03:25:07
ActionScript3 source code
/**
* Copyright kataribe ( http://wonderfl.net/user/kataribe )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/yWj5
*/
package {
import flash.display.Sprite;
public class FlashTest extends Sprite {
protected var areas:Vector.<Area> = new Vector.<Area>(18, true);
public function FlashTest() {
//エリアを初期化
for(var i:uint=0; i<3; ++i){
for(var j:uint=0; j<3; ++j){
areas[i] = new Area(i*71, 100, 0xFF0000);
areas[i] = new Area(i*50, i*50, 0x0000FF);
addChild(areas[i]);
}
}
}
}
}
import flash.display.Shape;
//エリア
class Area extends Shape{
public function Area(x:Number, y:Number, color:uint){
this.x = x;
this.y = y;
alpha = 0.5;
graphics.beginFill(color);
graphics.drawRect(-35, -15, 70, 40);
graphics.endFill();
}
}