I’ve created this demo:
http://www.mav-media.com/clients/SPN/
as you can see the content rotates around the center
now I’m trying to rotate this the same way:
http://www.mav-media.com/clients/SPN/bin/
Clearly the view is registered at 0,0. How do I rotate around the center instead? Here is the code I am using:
private function loop(e:Event):void {
var distx:Number = mouseX / 1000;
var disty:Number = mouseY / 600;
trace(view.x);
TweenLite.to(view, 1.5, {rotationY: (-6.5+(13*distx)), rotationX: (6.5-(13*disty)), ease:Expo.easeOut});
}
Any help with this would be greatly appreciated.
Thank you,