# 3D Flip - RotationY

**URL:** <https://forum.kirupa.com/t/3d-flip-rotationy/294178>\
**Category:** flash\
**Created:** [August 10, 2009, 2:47pm UTC](https://forum.kirupa.com/t/3d-flip-rotationy/294178 "2009-08-10T14:47:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jfloss](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@jfloss](https://forum.kirupa.com/u/jfloss)\
**Post date:** [August 10, 2009, 2:47pm UTC](https://forum.kirupa.com/t/3d-flip-rotationy/294178/1 "2009-08-10T14:47:41Z")

</div>

What’s going on?

I’m a newbie but I’m learning fast and furiously.

I want to rotate two images on the y axis. For instance I got two cards, front and back. On EnterFrame I want the rotating movieclip to exchange the front and back cards. I believe I got everything setup I just need help with getting the images to rotate once at that 90 degree angle (you know the angle where we can’t see any side of the image/thing rotating?

Thus I’m trying to do something like this but on ENTERFRAME instead of a button click:

[http://flashden.net/item/flash-3d-flip-card-as3cs4/full\_screen\_preview/43332](http://flashden.net/item/flash-3d-flip-card-as3cs4/full_screen_preview/43332)

here’s the actionscript I got thus far:

var theFront: frontCard = new frontCard();  
var theBack: backCard = new backCard();  
var theRotatingMovie:Sprite = new Sprite();  
addChild(theRotatingMovie);

theRotatingMovie.x=275;  
theRotatingMovie.y=175;

theRotatingMovie.addChild(theFront);

//var cardsArray:Array=[theFront,theBack];

addEventListener(Event.ENTER\_FRAME,rotateClip,false,0,true);

function rotateClip(event:Event):void  
{  
theRotatingMovie.rotationY+=5;  
if(theRotatingMovie.rotationY\>=90 && theRotatingMovie // I’m stuck here)  
{  
;  
}  
}

Please provide some help if anyone can ; thanks man

jfloss
