Skip navigation
Home/Support/

Forums

1050 Views 2 Replies Latest reply: Apr 22, 2009 9:29 AM by DJ Gecko RSS
DJ Gecko User 273 posts since
Dec 4, 2002
Currently Being Moderated

Apr 21, 2009 8:19 PM

rotationX and rotationY and rotationZ and PerspectiveProjection together break MouseEvent

When I change the rotation of a movie clip, and apply PerspectiveProjection, all mouse events applied to that movie clip and all the movie clips inside that movie clip break. 

 

The mouse event bellow will not work for me.

 

a_mc.rotationX = 1;

a_mc.rotationY = 1;

a_mc.rotationZ = 1;

//

var perspective:PerspectiveProjection = new PerspectiveProjection();

perspective.fieldOfView = 45;

 

var point:Point = new Point((a_mc.stage.stageWidth / 2) + 200, -350);

perspective.projectionCenter = point;

a_mc.transform.perspectiveProjection = perspective;

 

a_mc.addEventListener(MouseEvent.MOUSE_UP, testEvent);

 

function testEvent (event:MouseEvent):void {

     trace("testEvent");

}

 

 

 

But if I remove the rotation code it works:

 

//a_mc.rotationX = 1;

//a_mc.rotationY = 1;

//a_mc.rotationZ = 1;

//

 

var perspective:PerspectiveProjection = new PerspectiveProjection();

perspective.fieldOfView = 45;

 

var point:Point = new Point((a_mc.stage.stageWidth / 2) + 200, -350);

perspective.projectionCenter = point;

a_mc.transform.perspectiveProjection = perspective;

 

 

 

a_mc.addEventListener(MouseEvent.MOUSE_UP, testEvent);

 

 

function testEvent (event:MouseEvent):void {

     trace("testEvent");

}

 

 

 

 

And if I remove the perspective code it works:

 

a_mc.rotationX = 1;

a_mc.rotationY = 1;

a_mc.rotationZ = 1;

 

 

 

a_mc.addEventListener(MouseEvent.MOUSE_UP, testEvent);

 

 

function testEvent (event:MouseEvent):void {

     trace("testEvent");

}

 

 

 

Is there something I'm doing wrong?

 

Thanks!

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points