Hi,
I’m currently working on an image gallery which is supposed to bring in front the choosen image, by changing its Z value. I also must mention the gallery is X/Y rotated with an Enterframe function working with the mouseX and mouseY position.
My problem is that when I run the script, I got something like the picture here :
The chosen picture does move on the Z axe but the image grid behing got distorted for an unknown reason.
Here is my X/Y rotation function:
regPoint.x=stage.stageWidth/2;
regPoint.y=stage.stageHeight/2;
regPoint.z=800;
addChild(regPoint);
function rotate3D(e:Event):void {
var distx:Number = mouseX / stage.stageWidth;
var disty:Number = mouseY / stage.stageHeight;
Tweener.addTween(regPoint, {rotationY:(-50 + (100*distx)), rotationX:(50 - (100*disty)), time:1, transition:"easeOut"});
}
and here is the tween of a clicked image :
Tweener.addTween(clickedPic, {z:400, x:posX, y:posY, time:0.5, transition:"easeIn"});
Any idea ?
I’m really willing to figure this out to keep on learning 3D with AS3.
Thanks to all of you.