flash on 2010-11-11
http://www40.atwiki.jp/spellbound/pages/307.html
♥0 |
Line 32 |
Modified 2010-11-11 09:36:23 |
MIT License
archived:2017-03-20 17:00:14
ActionScript3 source code
/**
* Copyright aruerula ( http://wonderfl.net/user/aruerula )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/XzCU
*/
package
{
//http://www40.atwiki.jp/spellbound/pages/307.html
import flash.display.Sprite;
public class Main extends Sprite
{
private const WIDTH:int = 300;
private const HEIGHT:int = 300;
public function Main()
{
graphics.lineStyle(5.0);
graphics.drawRect(0, 0, WIDTH, HEIGHT);
graphics.lineStyle(1.0);
for (var x:int = 0; x < WIDTH; x += 8)
{
graphics.moveTo(x, HEIGHT / 2);
graphics.lineTo(x + 5, HEIGHT / 2);
}
for (var y:int = 0; y < HEIGHT; y += 8)
{
graphics.moveTo(WIDTH / 2, y);
graphics.lineTo(WIDTH / 2, y + 5);
}
var rect:Sprite = new Sprite();
rect.graphics.beginFill(0xED1A3D, 0.5);
rect.graphics.drawRect(0, 0, 120, 120);
rect.graphics.endFill();
addChild(rect);
rect.x = (WIDTH - rect.width) / 2;
rect.y = (HEIGHT - rect.height) / 2;
}
}
}