flash on 2010-2-2
♥0 |
Line 30 |
Modified 2010-02-04 17:07:26 |
MIT License
archived:2017-03-20 14:44:12
ActionScript3 source code
/**
* Copyright deform ( http://wonderfl.net/user/deform )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/tDFQ
*/
package {
import flash.filters.DisplacementMapFilter;
import flash.geom.Point;
import flash.display.BitmapData;
import flash.display.Bitmap;
import flash.display.Sprite;
public class FlashTest extends Sprite {
private static const WIDTH:Number = 465;
private static const HEIGHT:Number = 465;
private static const RANDOMCNT:Number = Math.random()*30;
private var bitmap:Bitmap;
private var bmd:BitmapData;
private var shape:Sprite;
public function FlashTest() {
// write as3 code here..
setup();
}
private function setup():void
{
drawShape(140);
}
private function drawShape(Size:uint):void
{
shape = new Sprite();
shape.graphics.beginFill(0xff00ff);
shape.graphics.drawRect((WIDTH/2)-Size/2,(HEIGHT/2)-Size/2,Size,Size);
shape.graphics.endFill();
addChild(shape);
}
}
}