In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

BlendMode.ADDのテスト

BlendMode.ADDのテスト
Get Adobe Flash player
by geko 11 Jun 2010
  • Related works: 2
  • Talk

    geko at 10 Jun 2010 20:19
    あれ,キャプチャされない・・・?
    ProjectNya at 11 Jun 2010 06:38
    背景を黒く塗っておけば、キャプチャされますよー。
    geko at 11 Jun 2010 18:15
    ほんとだ,できました! ありがとうございます。

    Tags

    Embed
/**
 * Copyright geko ( http://wonderfl.net/user/geko )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/DXhy
 */

//BlendMode.ADDのテスト

package {
	import flash.display.Sprite;
	import flash.events.MouseEvent;

	[SWF(backgroundColor="0x000000")]
	public class FlashTest extends Sprite{
		public function FlashTest() {
			Wonderfl.capture_delay(5);
			stage.addEventListener(MouseEvent.MOUSE_MOVE, drawCircle);
			//ProjectNyaさんのコメントの通り
			//背景を黒く塗ってみる
			this.graphics.beginFill(0x000000);
			this.graphics.drawRect(0,0,stage.stageWidth,stage.stageHeight);
			this.graphics.endFill();
		}
		
		public function drawCircle(event:MouseEvent):void{
			var circle:BlendModeTest = new BlendModeTest();
			circle.x = mouseX;
			circle.y = mouseY;
			this.addChild(circle);
		}
	}
}

import flash.display.Sprite;
import flash.display.BlendMode;
import flash.filters.BlurFilter;

class BlendModeTest extends Sprite{
	private var blur:BlurFilter = new BlurFilter(2,2,3);

	public function BlendModeTest(color:uint = 0x000000){
		if(color == 0x000000) color = Math.round(Math.random()*0xffffff);
		this.graphics.lineStyle(5,color,0.8);
		this.graphics.drawCircle(0,0,10+Math.round(Math.random()*20));
		
		this.filters = [blur];
		this.blendMode = BlendMode.ADD;
	}
}