1 Reply Latest reply on Dec 20, 2006 10:11 PM by kglad

    I have a function that tells a movie clip to hover around, how do i turn it off though?

    dtrace Level 1
      on roll over? I'd like to have it so that when you roll over an invisible button over the movieclip, it will stop the motion created by this function.

      HOW is this done? I mean, I can call a function, but how can I stop it? And then restart it when you roll off the invisible button.

      The following code is on frame 1 of my file....

      Please save from this hellish problem....Thanks.




      function floatMc(float_mc:MovieClip, range_num:Number, frames_num:Number):Void {
      var xMin:Number = float_mc._x-range_num;
      var xMax:Number = float_mc._x+range_num- 7;
      var yMin:Number = float_mc._y-range_num ;
      var yMax:Number = float_mc._y+range_num - 14;
      var frames:Number = frames_num;
      //number of seconds for the tween to take, and how often to start a new tween
      var me:MovieClip = float_mc;
      function newTween() {
      //adjust the easing class as needed
      var xNew:Number = (Math.random()*(xMax-xMin))+xMin;
      var yNew:Number = (Math.random()*(yMax-yMin))+yMin;
      xTween = new mx.transitions.Tween(me, "_x", mx.transitions.easing.Regular.easeInOut, me._x, xNew, frames, false);
      yTween = new mx.transitions.Tween(me, "_y", mx.transitions.easing.Regular.easeInOut, me._y, yNew, frames, false);
      }
      var IntID:Number = setInterval(newTween, (frames*(1000/31)));
      }
      floatMc(penthouse, 12, 72);
      floatMc(midnight, 12, 82);
      floatMc(photo, 12, 62);
      floatMc(meeting, 12, 66);
      floatMc(everything, 12, 80);
      floatMc(space, 12, 77);