Welcome, Guest
Want to take part in these discussions? Sign in if you have an account, or apply for one below
-
- CommentAuthorClark
- CommentTimeSep 24th 2010 edited
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 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. -
- CommentAuthorRichard
- CommentTimeSep 24th 2010
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 this...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();
}
}
1 to 2 of 2
