actionscript 3 - Stage Not Tracking MouseX or MouseY Without Clicking -
I have a fairly simple CS4 project where my desired effect is a clock face rotating in 3D space where the mouse On the stage, but, for some reason, to face the clock to understand the position of the mouse, I have to click on the stage whether it is happening to someone else? And, if so, why?
Import caurina.transitions.Tweener; Var PP: perspective projection = new perspective transplantation (); Pp.projectioncenter = New point (225,250); Pp.fieldOfView = 55; Clock.transform.perspectiveProjection = PP; AddEventListener (Event .ENTER_FRAME, rotateClock); Function Rotate Clock (E: Event): Zero {var xPcent: number = mousex / 225; Var yPcent: number = mouse / 250; Tweener.addTween (clock, {rotationY: 50 - (50 * xPcent), rotation X: 50 - (50 * ypcent), time: 2, infection: "easeOutCubic"}); }
Try adding a mouse event. MOUSE_MOVE Event instead of stage.
Comments
Post a Comment