Slide 15
Slide 15 text
⾃作で描画する
// rootに空のMovieClipを追加
var shapes = _root.createMovieClip(”shapes");
// Shapeを追加
var shape = shapes.createShape();
// ランダムに⾊を設定
var hue = 360 * Math.random();
var color = "hsl(" + hue + ", 100%, 50%)";
// ランダムに円を描画
shape.graphics
.beginFill(color)
.drawCircle(0, 0, Math.floor(20 * Math.random()));