用纯AS画个圆面
具有扩展性,比如loading……
var my_x = 100; var my_y = 100; var my_r = 50; var my_v = 5; var my_θ = 0; this.createEmptyMovieClip("my_mc", 1); function go() { with (my_mc) { clear(); moveTo(my_x, my_y); lineStyle(0, 0x000000, 0); beginFill(0xFF9933, 100); lineTo(my_x+my_r, my_y); } my_θ++; for (var i = 0; i<=my_θ; i++) { my_mc.lineTo(my_x+my_r*Math.cos(i*Math.PI/180), my_y+my_r*Math.sin(i*Math.PI/180)); } with (my_mc) { lineTo(my_x, my_y); endFill(); } if (my_θ == 360) { clearInterval(fps); } updateAfterEvent(); } var fps = setInterval(go, my_v);
[2005-1-13 12:27]