Flash probs

  • Started
  • Last post
  • 1 Response
  • donal

    Hi, i need to move a movie clip with easing. i'm using this:

    startx = _root.object._x;
    moved = _root.targetx-startx;
    _root.object._x = startx+(moved/10);
    starty = _root.object._y;
    moved = _root.targety-starty;
    _root.object._y = starty+(moved/10);

    But i need to pass parameters into it.

  • unfittoprint0

    loop = function(obj, x){
    obj._x += (x - obj._x)/4
    if(Math.abs( x - obj._x) < 1){
    clearInterval(obj.loopInt);
    }
    }

    function slide(obj, x){
    clearInterval(obj.loopInt);
    obj.loopInt = setInterval(this, "loop", 30, obj, x)
    }

    //usage for x=130

    slide(myMC, 130);