3D Flip - RotationY

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

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