1 Reply Latest reply on Jun 23, 2006 12:02 PM by audio:theory

    robert penner tweening functions ?

    _CK
      i trying to work with the robert penner ease equation. in my flash but i don't know what to fully script in my fla actions layer .to import the tweening functions from the folder: com/ roberpenner/ easing/ ... so far i have the folling defined:

      com.robertpenner.easing.Back;
      com.robertpenner.easing.Bounce;
      com.robertpenner.easing.Circ;
      com.robertpenner.easing.Cubic;
      com.robertpenner.easing.Elastic;
      com.robertpenner.easing.Expo;
      com.robertpenner.easing.Linear;
      com.robertpenner.easing.Quad;
      com.robertpenner.easing.Quart;
      com.robertpenner.easing.Quint;
      com.robertpenner.easing.Sine;

      also, how should i import the tweenManager.as class into my fla. from the folder: zigo/tweenManager.as

      can someone help me with this


        • 1. Re: robert penner tweening functions ?
          audio:theory
          Hi,

          You must import the classe's in any script that makes use of them. Mine are stored in "classes/com/robertpenner/easing" and the "classes" directory is in my flash classpath.
          Some simple code:

          import mx.transitions.Tween;
          import com.robertpenner.easing.*; // loads all classes in /easing

          var tw:Tween = new Tween( mcBall, "_x", Sine.easeOut, 0, 300, 2, true);

          This code will move mcBall horizontally from 0 to 300 in 2 second's using the Sine easing function.


          :theory