you have something preventing the mouse detection somewhere.
do you have something above the scene, other listenners running? is
the map alpha 0?
desable first all the others and try. When it works, then set the
others back one by one, and you'll know witch one is conflicting.
or add a trace in you mouse down listenners...
Fabrice
On Feb 20, 2009, at 7:22 PM, Lucas Guilherme wrote:
Didn't work.
But if I change my plane to a RoundedCube works.
Anyone can help me?
BR,
Líbiny
On Fri, Feb 20, 2009 at 1:41 PM, giuseppe mastrangelo <[email protected]
> wrote:
Hello,
Here a piece of code that works (I used the last version of Away3D
released few days ago)
{
...
_plane3d.addOnMouseDown(onPlaneMouseDown); // note: _plane3D is an
instance of Plane
...
}
private function onPlaneMouseDown(event:MouseEvent3D):void
{
// your code here!
}
Giuseppe
On Fri, Feb 20, 2009 at 1:01 AM, Lucas Guilherme <[email protected]>
wrote:
No didn't work.
This is my code
//MY PLANE
var cardPausA = new Plane( {width:72, height:96, segmentsH:1,
segmentsW:1 } );
cardPausA.material = new BitmapMaterial(Cast.bitmap(pausA));
cardPausA.scale(50);
cardPausA.x = -4000;
cardPausA.z = 11000;
cardPausA.y = -9600;
cardPausA.rotationY = 150;
//MOUSE LISTENER
cardPausA.addOnMouseDown(oncardPausAMouseDown);
function oncardPausAMouseDown(event:MouseEvent3D):void {
// set the clicked mesh a new material
trace("clicou");
}
//THIS MOUSE IS TO ROTATE THE CAMERA - Maybe these events below is
causing problems for my plane?
stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
My project is here: http://www.encontrocristao.com.br/away3d/CardBar.html
Please take a look. I want when click in the middle card, they will
distribute for the "invisible" players but
didn't work, so I created the button Distribute.
Any idea with this mouse events?
BR,
Líbiny
On Thu, Feb 19, 2009 at 9:46 PM, Rob Bateman <[email protected]>
wrote:
MouseEvent should be MouseEvent3D
let us know if that works!
Rob
On Thu, Feb 19, 2009 at 11:12 PM, Lucas Guilherme <[email protected]>
wrote:
Hello,
I'm using this code to get clicked event in a plane
myPlane.addOnMouseDown(planeMouseDown);
function planeMouseDown(event:MouseEvent):void {
trace("clicked");
}
and didn't work.
When I put the same code for a RoundedCube for example, works.
Any idea?
BR,
Líbiny
--
Rob Bateman
Flash Development & Consultancy
[email protected]
www.infiniteturtles.co.uk
www.away3d.com