Flint Particle System Forum - Pixel Renderer and mouse events 2011-12-12T23:57:15+00:00 http://flintparticles.org/forum/ Lussumo Vanilla & Feed Publisher Pixel Renderer and mouse events http://flintparticles.org/forum/comments.php?DiscussionID=403&Focus=1383#Comment_1383 2010-09-24T11:59:08+01:00 2010-09-24T12:20:20+01:00 Clark http://flintparticles.org/forum/account.php?u=170 Hey everyone! I need to have a rendering layer on top of my application. DisplayObjectRenders are fine. I switched over this morning to PixelRenderer but it "captures" all my mouse ...
I need to have a rendering layer on top of my application. DisplayObjectRenders are fine.

I switched over this morning to PixelRenderer but it "captures" all my mouse events which makes the application unusable.

EffectContainer - MouseEnabled and MouseChildren = false
PixelRenderer - MouseEnabled and MouseChildren = false

Where EffectContainer contains PixelRederer:

Stage
---EffectContainer
------ PixelRenderer
---Buttons

But the issue remains.

Does anyone know what im missing?

Thanks, and thanks again for the particles Richard :D

Clark.]]>
Pixel Renderer and mouse events http://flintparticles.org/forum/comments.php?DiscussionID=403&Focus=1386#Comment_1386 2010-09-24T19:19:41+01:00 2011-12-12T23:57:15+00:00 Richard http://flintparticles.org/forum/account.php?u=1 I just tested this, and can't reproduce your issue. In my test, clicks pass straight through the PixelRenderer to the objects underneath. For the test, I modified the GravityWells example like ...
public class Main extends Sprite
{
private var emitter:Emitter2D;
private var clip:Sprite;
private var container:Sprite;

public function Main()
{
clip = new Sprite();
clip.graphics.beginFill( 0xFF0000 );
clip.graphics.drawCircle( 0, 0, 50 );
clip.graphics.endFill();
clip.x = 200;
clip.y = 200;
addChild( clip );
clip.addEventListener( MouseEvent.CLICK, onClick );

emitter = new GravityWells();

var renderer:PixelRenderer = new PixelRenderer( new Rectangle( 0, 0, 400, 400 ) );
renderer.addFilter( new BlurFilter( 2, 2, 1 ) );
renderer.addFilter( new ColorMatrixFilter( [ 1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0.99,0 ] ) );
renderer.addEmitter( emitter );

container = new Sprite();
container.addChild( renderer );
container.mouseEnabled = false;
container.mouseChildren = false;
addChild( container );

emitter.start();
}

private function onClick( event:MouseEvent ):void
{
clip.graphics.clear();
clip.graphics.beginFill( Math.floor( Math.random() * 0xFFFFFF ) );
clip.graphics.drawCircle( 0, 0, 50 );
clip.graphics.endFill();
}
}
]]>