flash on 2012-12-13
/**
* Copyright spryboy ( http://wonderfl.net/user/spryboy )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/yO66
*/
package {
import flash.events.Event;
import flash.events.MouseEvent;
import flash.display.Sprite;
public class FlashTest extends Sprite {
private var sp:Sprite = new Sprite();
public function FlashTest() {
// write as3 code here..
addEventListener(Event.ENTER_FRAME, onFrame);
}
private function onFrame(e:Event):void{
sp.graphics.beginFill(Math.random()*0xffffff, Math.random());
sp.graphics.drawRect(Math.random()*stage.stageWidth, Math.random()*stage.stageHeight, Math.random()*50, Math.random()*50);
sp.graphics.endFill();
addChild(sp);
}
}
}