For what it's worth, I spent a lot of time creating a TweenLite class that
does exactly what you want (I think). It adds less than half of the Kb to
the SWF compared to other Tweening engines I've worked with (about 2Kb) and
it allows you to very easily tween multiple properties with a single call
like so: 

gs.TweenLite.to(mcClip, 1.5, {_x:120, _y:50, _xscale:70, _yscale:70, ease:
Strong.easeOut});

You can even delay the tween for a set amount of time, have it call a
function when it's done, pass arguments to that function, and more. See the
documentation at the top of the class file for more info.

Download it at:
http://www.greensock.com/ActionScript/TweenLite.zip

I hope it serves you well. This is, by the way, the first time I've made my
little TweenLite class publicly available and I'm hoping it'll prove
valuable for others as well. I'd welcome comments/suggestions (please be
kind).

Jack Doyle


------------------------------
Date: Wed, 2 Aug 2006 10:56:12 -0400
From: "Matthew Ganz" <[EMAIL PROTECTED]>
Subject: Re: [Flashcoders] tweening multiple properties simultaneously
To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
        reply-type=response

thanks for the links.

enrico - i tried scaling first and it didn't work, and rich, i tried the 
TweenExtend class and that also didn't work. i'm still getting the same 
results. the zooming in works but my tweens of the 'x' and 'y' is not 
working anymore.

below is my function. can you see s/thing in the way i'm calculating the 
displacement for 'nX' and 'nY' that may be the cause of the problem?

thanks for lending a hand. very much appreciated.

public function zoomIn(activeState:MovieClip)
 {
  var nX:Number = (Stage.width/2) - activeState._xmouse; // activeState is 
reference to US map mc.
  var nY:Number = (Stage.height/2) - activeState._ymouse;

  // zoom in to the selected state.
  new Tween( activeState, "_x", Strong.easeOut, activeState._x, nX, 2, 
true );
  new Tween( activeState, "_y", Strong.easeOut, activeState._y, nY, 2, 
true );

  // zoom into the map
  new Tween( activeState, "_xscale", Strong.easeOut, activeState._xscale, 
200, 2, true );
  new Tween( activeState, "_yscale", Strong.easeOut, activeState._yscale, 
200, 2, true );
 }



_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to