Jump to content
Search Community

pushfate

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by pushfate

  1. Hi Im kinda new to AS3, I normally code in AS2 and Im using flash cs3.

     

    I have created a zooming playing card animation and so basically inside the zooming movie clip I have placed the front_mc and the back_mc of the card and the back_mc has an animation on it when it flips over all that works except, I want the card to auto flip at the end of the animation on the main timeline without having to click on the card itself, I dont really mind if the is no flip back option, I just want the card to flip over at frame 20 on the maintime.

     

    I downloaded the greensock component, I used this because you cant distort mc's and bitmaps and this is the code Im currently using which I got from this site:

     

    import com.greensock.TweenLite;

    front_mc.addEventListener(MouseEvent.CLICK,cardCli ck);

    function cardClick(event:MouseEvent):void {

    back_mc.visible = true;

    TweenLite.to(front_mc,0.5,{scaleX:-1, overwrite:false});

    TweenLite.to(front_mc,0,{alpha:0,delay:.15, overwrite:false});

    TweenLite.to(back_mc,0.5,{scaleX:-1, overwrite:false, onComplete:hidden});

    TweenLite.to(back_mc,0,{alpha:1,delay:.15, overwrite:false});

    back_mc.addEventListener(MouseEvent.CLICK, backClick);

    }

    function hidden() {

    front_mc.visible = false;

    }

    function backClick(event:MouseEvent):void {

    front_mc.visible = true;

    TweenLite.to(back_mc,0.5,{scaleX:+1, overwrite:false});

    TweenLite.to(back_mc,0,{alpha:0,delay:.15, overwrite:false});

    TweenLite.to(front_mc,0.5,{scaleX:+1, overwrite:false, onComplete:ReHidden});

    TweenLite.to(front_mc,0,{alpha:1,delay:.15, overwrite:false});

    }

    function ReHidden() {

    back_mc.visible = false;

    }

     

    Does anyone know how to make the front_mc flip over to the back_mc without a mouse click on frame 20 of the main timeline.

     

    PLEASE HELP.

×
×
  • Create New...