1 Reply Latest reply on Sep 5, 2006 12:09 PM by Newsgroup_User

    Can you Tween custom properties?

    stratosnatcher
      Can you directly tween some property other than "_x", "_y"...physical on-screen built-in properties?

      Or would I pretty much have to do some trickery with event listeners and do some calculations based on one tween to make another tween (with easing) of some other numeric property I'm tracking?
        • 1. Re: Can you Tween custom properties?
          Level 7
          stratosnatcher,

          > Can you directly tween some property other than "_x",
          > "_y"...physical on-screen built-in properties?

          Using the Tween class, you mean?

          > Or would I pretty much have to do some trickery with
          > event listeners and do some calculations based on one
          > tween to make another tween (with easing) of some
          > other numeric property I'm tracking?

          Seems like it works.

          import mx.transitions.Tween;
          import mx.transitions.easing.*;
          mc.custom = 0;
          var tw:Tween = new Tween(mc, "custom", Strong.easeInOut, 0, 100, 12);
          tw.onMotionChanged = function() {
          trace(mc.custom);
          };

          In my Output panel, that custom property, MovieClip.custom, updates as
          expected.


          David Stiller
          Adobe Community Expert
          Dev blog, http://www.quip.net/blog/
          "Luck is the residue of good design."