hi guys,

I have found a bug in away3lite. Interactivity does not work in
MovieMaterial in the latest revision. It is easy to reproduce the bug.

                public var plane:Plane;
                public var mat:MovieMaterial;
                private function testMoviematerialInteractivity():void
                {
                        var sprite:Sprite = new Sprite();
                        sprite.mouseEnabled = true;
                        sprite.mouseChildren = true;
                sprite.addEventListener(MouseEvent.MOUSE_DOWN,this.onMouseDown);
                        this.drawCircle(sprite,new Point(100,100),500);
                        mat = new MovieMaterial(sprite);
                        //mat.debug =true;
                        plane = new Plane(mat,1000,1000,4,4,false);
                        plane.z = 400;
                        plane.y = 400;
                        plane.bothsides = true;
                        this.scene.addChild(plane);
                        this.view.render();
              }

protected function onMouseDown(event:MouseEvent):void
                {
/*this event must fire when clicking on the circle area of plane but
it does not*/
                        this.plane.material = new ColorMaterial(0xFF0000);
                }


        protected function drawCircle(canvas:Sprite,
shift:Point,rad:Number=40,col:uint=0xEEFFEE):void
                {//draws circle on sprite
                        canvas.graphics.beginFill(col);
                        canvas.graphics.drawCircle(shift.x, shift.y, rad);
                        canvas.graphics.endFill();
                }

Reply via email to