Copy link to clipboard
Copied
Help!! I am new to Flash. I am trying to make a card flip, I have a photo on one side and info on the back. It is controlled by a button. I get the card to flip but the infor is on the side2 is flipped to be a mirror image so the text is backwards. I can't figure out how to fix this. Can anyone help?
thanks!
Here is my code:
import fl.transitions.Tween;
import fl.transitions.easing.Strong;
import fl.transitions.TweenEvent;
con.sidea.flip.addEventListener(MouseEvent.CLICK, onflip);
con.sideb.flip.addEventListener(MouseEvent.CLICK, onflip);
addEventListener(Event.ENTER_FRAME,loop);
var isStill: Boolean=true;
var arraytween:Array = new Array ();
function onflip (e:Event) {
if (isStill) {
arraytween.push (new Tween (con,'rotationY', Strong.easeOut,con.rotationY,con.rotationY+180,1,true));
arraytween [0] .addEventListener(TweenEvent.MOTION_FINISH,reset);
isStill=false;
}
}
function reset (e:Event) {
isStill=true;
arraytween=[];
}
function loop(e:Event) {
if (con.rotationY>=90 && con.rotationY<=270) {
con.addChild(con.sideb);
}else {
con.addChild(con.sidea);
con.scaleX=1;
}
if (con.rotationY>=360) {
con.rotationY=0;
}
Copy link to clipboard
Copied
My guess would be that you need to make the text backwards to begin with if you are flipping it.
Copy link to clipboard
Copied
I am feeling pretty stupid, how would I do that in flash? do you know?
Copy link to clipboard
Copied
I found it. Sorry, been staring at the screen way to long. I am taking a break. Thank you for your help!
Copy link to clipboard
Copied
If it involves a textfield that you place on the stage manually, then select the textfield and from the menu bar select Modify -> Transform -> Flip Horizontal.
Someone else may have a more intelligent answer for you. I don't have a version of Flash that supports rotationX/Y/Z properties, just rotation, so I am just guessing that this is what you can do to get what you want.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more