MozillaShumwayのサイトにあるASサンプル01
由来:https://github.com/mozilla/shumway/tree/master/examples/banana
♥0 |
Line 22 |
Modified 2013-02-27 04:54:50 |
MIT License
archived:2017-03-20 11:20:32
ActionScript3 source code
/**
* Copyright tsu_droid ( http://wonderfl.net/user/tsu_droid )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/ws7N
*/
package {
import flash.display.Graphics;
import flash.display.MovieClip;
import flash.geom.Point;
public class Banana extends MovieClip {
public function Banana() {
var g:Graphics = this.graphics;
for (var x:int = 0; x < 2; x++) {
for (var y:int = 0; y < 2; y++) {
var c:Point = new Point(x * 110, y * 110);
c.offset(60, 60);
for (var i:int = 0; i < 100; i++) {
var color:uint = Math.round(Math.random() * 0xFFFFFF);
g.lineStyle(2, color , 0.75);
g.moveTo(c.x, c.y);
g.lineTo(c.x + Math.cos(i) * 50, c.y + Math.sin(i) * 50);
}
}
}
}
}
}