but, .... pardon my pure and blatant ignorance, but isn't a Sprite a  
simple 'graphic' ??? .... I mean, replace your sprite with a  
MovieClip and it should work ...
I would have said, theoretically (since I never did any AS3) that a  
Sprite is container for a graphic, and not an interactive  
container ... I hope I am wrong -....
Cedric


> A online demo here:
> http://www.rgenerat.org/iileyblog/?p=64
>
>
> 2007/3/7, iiley <[EMAIL PROTECTED]>:
> OH, NO!!!!!!!!!! AS3/FlashPlayer9 is driving me crazy these days!
>
> Rakos, you are right, masked by child is very cool, i love it. BUT,  
> there is a bug of event triggering, see this demo:
>
> package
> {
> import flash.display.Sprite;
> import flash.display.Shape;
> import flash.filters.GlowFilter;
> import flash.events.MouseEvent;
>
> public class MaskTest extends Sprite
> {
>  private var sprite:Sprite;
>
>  public function MaskTest()
>  {
>   super();
>
>   sprite = new Sprite();
>   sprite.graphics.beginFill(0xff0000);
>   sprite.graphics.drawRect (0, 0, 100, 100);
>   sprite.graphics.endFill();
>   addChild(sprite);
>
>   var clip:Sprite = new Sprite();
>   clip.graphics.beginFill(0x000000);
>   clip.graphics.drawEllipse(0, 0, 100, 100);
>   clip.graphics.endFill ();
>   sprite.addChild(clip);
>   sprite.mask = clip;
>
>   //if you comment this line, the mouse down event will works well
>   //Why?????????
>   sprite.filters = [new GlowFilter(0x0000FF, 1, 10, 10, 4)];
>   //If you comment this line, the event works well too.
>   sprite.y = 150;
>   sprite.addEventListener(MouseEvent.MOUSE_DOWN, __mouseDown);
>  }
>
>  private function __mouseDown(e:MouseEvent):void{
>   trace("__mouseDown");
>  }
> }
> }
>
> If i moved both set filters and moved sprite, the mouse event will  
> not trigger, if i comment any one of them, then event triggers  
> corrently.
> This must be a bug of filters, similar to filters work with  
> scrollRect bug.
>
> Sadly~~~ my poor flash player 9. sadly.................
>
> Regards~~~
>
> -- 
> iiley
> AsWing http://www.aswing.org
> Personal http://www.iiley.com
>
>
>
> -- 
> iiley
> AsWing http://www.aswing.org
> Personal http://www.iiley.com
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org


_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to