Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

action script 3 help card flip

New Here ,
Jun 30, 2011 Jun 30, 2011

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;

    }

TOPICS
ActionScript
789
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 30, 2011 Jun 30, 2011

My guess would be that you need to make the text backwards to begin with if you are flipping it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 30, 2011 Jun 30, 2011

I am feeling pretty stupid, how would I do that in flash?  do you know?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 30, 2011 Jun 30, 2011

I found it.  Sorry, been staring at the screen  way to  long.  I am taking a break.  Thank you for your help!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 30, 2011 Jun 30, 2011
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines