flash on 2010-12-17
♥0 |
Line 33 |
Modified 2010-12-17 16:05:09 |
MIT License
archived:2017-03-20 03:37:28
ActionScript3 source code
/**
* Copyright Linkforce ( http://wonderfl.net/user/Linkforce )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/mWz5
*/
package {
import flash.display.Sprite;
import flash.events.Event;
import flash.display.Graphics;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.display.Shape;
public class FlashTest extends Sprite {
private static const SIZE : int = 465;
public function FlashTest() {
// write as3 code here..
init();
}
private function init():void{
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.frameRate = 60;
var shape:Shape = new Shape();
shape.cacheAsBitmap = true;
shape.graphics.beginFill(0);
shape.graphics.drawRect(0, 0, SIZE, SIZE);
mask = shape;
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
createBall();
}
private function createBall():void{
graphics.drawCircle(300, 300, 4);
graphics.beginFill(0xFF00FF, 1);
graphics.endFill();
}
private function enterFrameHandler(e:Event):void{
}
}
}