brlrt / away3d

Automatically exported from code.google.com/p/away3d
0 stars 0 forks source link

Mouse3d events only work on part of "scaled" materials #12

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
To simulate on TransformBitmapMaterial:

floor.material =  new TransformBitmapMaterial(Cast.bitmap("floortex"),
{scaleX:0.5, scaleY:0.5, repeat:true});//, precision:20});
floor.addOnMouseMove(this.click3D);

private function click3D(e:MouseEvent3D):void {
   var num3d = new Number3D(e.sceneX, e.sceneY, e.sceneZ);
   trace(num3d)
  }

To simulate on MovieMaterial:

var bmap:Bitmap = new Bitmap(Cast.bitmap(yellow));
var mc:MovieClip = new MovieClip();
var spr:Sprite = new Sprite();
spr.addChild(bmap);
mc.addChild(spr);
mc.gotoAndStop(1);
var sp:MovieClipSprite = new MovieClipSprite(mc, {rescale:true,
scaling:3});
sp.addOnMouseDown(onMouseIsPressed);
view.scene.addChild(sp);

function onMouseIsPressed(event:MouseEvent3D):void
{
     trace("FTW");

}

Original issue reported on code.google.com by flashn...@gmail.com on 25 Jun 2008 at 3:11

GoogleCodeExporter commented 8 years ago
fixed in trunk for TransformBitmapMaterial

Original comment by rob.bate...@gmail.com on 24 Aug 2008 at 1:25

GoogleCodeExporter commented 8 years ago
closed

Original comment by rob.bate...@gmail.com on 7 Nov 2008 at 6:17