flash on 2009-7-28
♥0 |
Line 19 |
Modified 2009-07-28 13:16:23 |
MIT License
archived:2017-03-20 02:17:07
ActionScript3 source code
/**
* Copyright kinescript ( http://wonderfl.net/user/kinescript )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/wvlL
*/
package {
import flash.display.Sprite;
public class FlashTest extends Sprite {
public function FlashTest() {
var box:Sprite = new Sprite();
box.graphics.beginFill(0xFF0000);
box.graphics.drawRect(0, 0, 100, 100);
box.graphics.endFill();
box.x = stage.stageWidth/2 - box.width/2;
box.y = stage.stageHeight/2 - box.height/2;
addChild(box);
graphics.lineStyle(1, 0x0000FF);
graphics.moveTo(stage.stageWidth, 0);
graphics.lineTo(0, stage.stageHeight);
graphics.moveTo(0, 0);
graphics.lineTo(stage.stageWidth, stage.stageHeight);
}
}
}