speed = distance / duration as long as you have two of those you can compute the third just fine. the problem is Fx.Elements uses the same duration for every transition, making "speed" the variable, so you must use two instances of Fx.Tween/Morph.
On Thu, Jul 9, 2009 at 6:51 PM, Steve Onnis (via Nabble) < [email protected]<ml-user%[email protected]> > wrote: > So what you really want is a "speed" property..in pps (pixels per second) > instead of a "duration" ? > > ------------------------------ > *From:* anutron > [mailto:aa...@...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3235376&i=0>] > > *Sent:* Friday, 10 July 2009 10:07 AM > *To:* > mootools-us...@...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3235376&i=1> > *Subject:* [Moo] Re: Tween two different elements at the same speed > > This kinda sucks because with MooTools 2.0 this would be easier (or at > least work better) because all animations share the same timer. > The only way to do this is to have two instances of Fx.Tween or Fx.Morph > and to set their durations relative to their sizes. So if one is going to > 50px and the other to 100px, you'd set the duration for the second one to be > twice as long as the first. This may not run smoothly in MooTools 1.* > > On Thu, Jul 9, 2009 at 4:38 PM, 4fingers (via Nabble) < > ml-user%2b201837-1000811...@...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3234893&i=0> > > wrote: > >> >> Hi, >> >> I am wanting to find out if there is a way to tween two elements at >> the same speed given that they are different sizes. >> >> Since the speed depends on the size of the tween I am finding it hard >> to have one element tween from 0px to 100px then on completion have >> another element tween from 0px to 50px at the same speed. >> >> Is there any other way I can control the speed of the tween apart from >> simply giving it a duration. If not the only idea I have is to set up >> some algorithm that given the size and speed for one element I could >> maybe determine the speed required for another element given its >> size. >> >> I am not even sure if that algorithm is possible so any ideas would be >> great. >> >> Thanks >> > > The MooTools Tutorial: www.mootorial.com Clientcide: www.clientcide.com > > ------------------------------ > View this message in context: Re: [Moo] Tween two different elements at > the same > speed<http://n2.nabble.com/-Moo--Tween-two-different-elements-at-the-same-speed-tp3234782p3234893.html> > Sent from the MooTools Users mailing list > archive<http://n2.nabble.com/MooTools-Users-f660466.html>at Nabble.com. > > > ------------------------------ > View message @ > http://n2.nabble.com/-Moo--Tween-two-different-elements-at-the-same-speed-tp3234782p3235376.html > To start a new topic under MooTools Users, email > [email protected]<ml-node%[email protected]> > To unsubscribe from MooTools Users, click here< (link removed) >. > > > ----- The MooTools Tutorial: http://www.mootorial.com www.mootorial.com Clientcide: http://www.clientcide.com www.clientcide.com -- View this message in context: http://n2.nabble.com/-Moo--Tween-two-different-elements-at-the-same-speed-tp3234782p3236855.html Sent from the MooTools Users mailing list archive at Nabble.com.
