[Tweener] Scale in, Rotate and then Scale out
Gareth Edwards
g1power at hotmail.com
Sun Dec 27 17:54:05 PST 2009
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.
http://clk.atdmt.com/GBL/go/177141665/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.caurinauebi.com/pipermail/tweener-caurinauebi.com/attachments/20091228/4f84ecfe/attachment.htm>
More information about the Tweener
mailing list