flash on 2010-3-25
import flash.display.Bitmap;
import flash.display.BitmapData;
/**
* Copyright kiyobu ( http://wonderfl.net/user/kiyobu )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/95H3
*/
package {
import flash.display.Sprite;
import flash.events.Event;
//import flash.display.Bitmap;
//import flash.display.BitmapData;
public class FlashTest extends Sprite {
//public var bmp:Bitmap;
public function FlashTest() {
// write as3 code here..
graphics.lineStyle(1,0x333333,1);
addEventListener(Event.ENTER_FRAME, loop);
}
public function loop(e:Event):void {
graphics.moveTo(0,random(stage.stageHeight));
graphics.lineTo(stage.stageWidth,random(stage.stageHeight));
}
public function random(n:Number):Number{
return Math.floor(Math.random() * n);
}
}
}