Share Posted April 3, 2013 Hi, I found a solution in this forum to this problem - unfortunately it doesn't work for me. I do a rotationY by 180 degrees. So after the tween the image is flipped and you are suposed to see the backside - but then the image is blury. So I applied the solution I found here (deBlur) but then the image flips back to the frontside. I appreciate any hint. Max TweenLite.to(Africa1, .8,{ alpha: 1, rotationY : Africa1.rotationY -180,onComplete: deBlur, onCompleteParams: [Africa1], delay: .3 } );} //kill matrix3D and reset x and yfunction deBlur( Africa1:MovieClip ): void{ var currentX = Africa1.x; var currentY = Africa1.y; Africa1.transform.matrix3D = null; Africa1.x = currentX; Africa1.y = currentY; } Link to comment Share on other sites More sharing options...
Share Posted April 3, 2013 Have you tried setting scaleX or scaleY to -1? 1 Link to comment Share on other sites More sharing options...
Author Share Posted April 4, 2013 Hi Jack, thanks for the reply. scaleX= -1 works for me since this a 2D clip so no problem. TweenMax.to(mc_Africa1, 1, { scaleX:-1}); BUT now I ran into something I thought is not relevant for 2D. When I resize the movieclips manually (height and width) and do a scaleX-1 the image is destorted, that is the perspective projection is wrong. I thought this is only an issue when applying a rotationY on a 3D object. I studied your answer to the question by CptEO: 'Simple rotationY 90 gives unexpected result' but I think in my case this is not relevant since I am using scaleX now. I attached this little four-liner fla to demonstrate the issue. Do you have any idea? Thanks for any hint. Max Link to comment Share on other sites More sharing options...
Share Posted April 4, 2013 I didn't see any FLA, so I'm not entirely sure this is what you need, but have you tried this?: mc_Africa1.scaleX *= -1; (or you could do the same to scaleY) It just multiplies whatever it is currently by -1, thus inverting it. Link to comment Share on other sites More sharing options...
Author Share Posted April 4, 2013 Sorry I forgot the fla file last time. This line works when the movieclip is dropped from the library. TweenMax.to(mc_Africa1, 1, { scaleX:-1}); This line doesn't work after a resize of the movieclip. You can see the effect in the attached fla file. Max Pixel shift on scaleX after resize.zip Link to comment Share on other sites More sharing options...
Share Posted April 5, 2013 Yes, since you changed the scale of the large africa clip on the stage, you need the negative value of that new scaleX, not its normal scaleX of 1. Basically if the object has scaleX:500 before the tween you need to tween to scaleX:-500 like this: function flipAll(e:MouseEvent):void { removeChild(btn); removeChild(btn_text); //this works because you haven't resized the clip. its scale is 1 prior to the tween TweenMax.to(mc_Africa1, 1, { scaleX:-1}); //you need to access the current scaleX and get its inverted value TweenMax.to(mc_Africa2, 1, { scaleX: -mc_Africa2.scaleX}); } Does that help? Link to comment Share on other sites More sharing options...
Author Share Posted April 5, 2013 Thank you very much, I understand. This helped me a lot. Max Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now