flash on 2011-1-19
/**
* Copyright yama3 ( http://wonderfl.net/user/yama3 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/cLNB
*/
package {
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.BlendMode;
import flash.display.Graphics;
import flash.display.Shape;
import flash.display.Sprite;
import flash.events.Event;
[SWF(backgroundColor="0x000000", frameRate="30", width="465", height="465")]
public class FlashTest extends Sprite {
public function FlashTest() {
var sh:Shape = new Shape(),
g:Graphics = sh.graphics,
i:int, n:int = 465;
var bmd:BitmapData = new BitmapData(n, n, false, 0);
bmd.lock();
for(i=0; i<n; i++)
{
g.clear();
g.lineStyle(2, (i/3<<8) | ((255-i)<<8)*((255-i>>-1)+1)|255,0.08);
g.moveTo(i, n), g.lineTo(n, n-i);
g.moveTo(i, 0), g.lineTo(0, n-i);
g.moveTo(i, 0), g.lineTo(n, i);
g.moveTo(0, i), g.lineTo(i, n);
bmd.draw(sh, null, null, BlendMode.SCREEN, null, true);
}
addChild(new Bitmap(bmd, "auto", true));
}
}
}