flash on 2010-4-13
♥0 |
Line 43 |
Modified 2010-04-13 21:10:33 |
MIT License
archived:2017-03-10 21:19:18
ActionScript3 source code
/**
* Copyright kihon ( http://wonderfl.net/user/kihon )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/aJkQ
*/
package
{
import flash.display.Sprite;
public class Main extends Sprite
{
public function Main()
{
graphics.beginFill(0x0);
graphics.drawRect(0, 0, 465, 465);
graphics.endFill();
var color:Array =
[
[0x5E3930, 0],
[0xF5B321, 4],
[0x5E3930, 9],
[0x53A1AE, 18],
[0xF40107, 21],
[0x53A1AE, 24],
[0xFCFCFA, 36],
[0xFCFCFA, 50],
[0x53A1AE, 64],
[0xF40107, 76],
[0x53A1AE, 79],
[0x5E3930, 82],
[0xF5B321, 91],
[0x5E3930, 96],
[0x0, 100]
];
const WIDTH:int = 300;
var haruhi:Sprite = new Sprite();
addChild(haruhi);
for (var i:int = 0; i < color.length - 1; i++)
{
var x0:int = WIDTH * color[i][1] / 100
haruhi.graphics.beginFill(color[i][0]);
haruhi.graphics.drawRect(x0, 0, WIDTH * color[i + 1][1] / 100 - x0, 200);
haruhi.graphics.endFill();
}
haruhi.x = (465 - haruhi.width) / 2;
haruhi.y = (465 - haruhi.height) / 2;
}
}
}