7 Replies Latest reply on Mar 25, 2007 9:16 PM by kglad

    Random Tween Effect(type)  - is it possible??

      HI All
      I have some 50 mc's on stage, and wondered if its possible to have the motion (e.g _x,_y,_alpha) be random.
      For example:
      say i had
      import mx.transitions.Tween;
      import mx.transitions.easing.*;
      var Eq = [mx.transitions.easing.Back.easeIn, mx.transitions.easing.Back.easeOut, mx.transitions.easing.Back.easeInOut, mx.transitions.easing.Bounce.easeIn, mx.transitions.easing.Bounce.easeOut, mx.transitions.easing.Bounce.easeInOut, mx.transitions.easing.Elastic.easeIn, mx.transitions.easing.Elastic.easeOut, mx.transitions.easing.Elastic.easeInOut, mx.transitions.easing.Regular.easeIn, mx.transitions.easing.Regular.easeOut, mx.transitions.easing.Regular.easeInOut, mx.transitions.easing.Strong.easeIn, mx.transitions.easing.Strong.easeOut, mx.transitions.easing.Strong.easeInOut, mx.transitions.easing.None.easeIn, mx.transitions.easing.None.easeOut, mx.transitions.easing.None.easeInOut];

      and then i had
      new Tween(target_mc, "_x", Eq[Math.random()*18), x1, x2, t, true);

      Is there any reason i could not have this?? (i just cant seem to get it to work. :-(

      It makes the whole project seem more organic having a random effect rather then fixing the tween as
      "new Tween(target_mc, "_x", Regular.easeOut, x1, x2, t, true);"