[Tweener] Scale in, Rotate and then Scale out

Gerry Creighton gerry at thespikeranch.com
Sun Dec 27 20:32:26 PST 2009


Gareth,
You are trying to rescale the "con" back to 1 before it's done the first 
scaling tween.
Maybe try setting the delay to 2 so the first two tweens (scale and 
rotation) do their thing
then the scaling back to 1 can occur after that?

-Gerry

Gareth Edwards wrote:
> Hi Tweeners,
>
> I recently discovered tweener and i need a little help with what i am 
> trying to do.
>
> I have been working with a tutorial i found at 
> http://www.gotoandlearn.com/play?id=91 which is basically a double 
> sided screen that can be rotated 180 degrees around the Y axis using 
> tweener. I want to take it a little further and have it scale in 50%, 
> rotate and then scale back out to its origional size but for the life 
> of me i can't seem to work out how to do it.
>
> The code that controls the rotation is pretty simple:
>
> function cl2(e:Event):void
> {
> if(!isTurning)
>  {
>   Tweener.addTween(con, {rotationY:con.rotationY-180, time:2, 
> onComplete:function(){isTurning=false;}});
>   isTurning = true;
>  }
> }
>
> So I tried this:
>
> function cl2(e:Event):void
> {
>  if(!isTurning)
>  {
>   Tweener.addTween(con, {scaleX:.5, scaleY:.5, time:2, 
> transition:"easeOut"});
>   Tweener.addTween(con, {rotationY:con.rotationY-180, time:2, 
> transition:"easeinOutCirc", delay:.5});
>   Tweener.addTween(con, {scaleX:1, scaleY:1, time:2, 
> transition:"easeIn", delay:.5, onComplete:function(){isTurning=false;}});
>   isTurning = true;
>  }
> }
>
> which gives me the drop in and rotation but it doesn't go back to it's 
> origional size?
>
> Can anyone help me?
>
> Thanks
>
> Gareth Edwards
>
> ------------------------------------------------------------------------
> Hotmail: Trusted email with powerful SPAM protection. Sign up now. 
> <http://clk.atdmt.com/GBL/go/177141665/direct/01/>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tweener mailing list
> Tweener at lists.caurinauebi.com
> http://lists.caurinauebi.com/listinfo.cgi/tweener-caurinauebi.com
>    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.caurinauebi.com/pipermail/tweener-caurinauebi.com/attachments/20091227/50ad0c3b/attachment.htm>


More information about the Tweener mailing list