flash random Q

Out of context: Reply #7

  • Started
  • Last post
  • 14 Responses
  • unfittoprint0

    randomize dat mutha!

    //evaluates random time within 2 seconds (2000 milliseconds)
    function randomTimer() {
    randTime = Math.ceil(Math.random()*2000);
    return randTime;
    }
    function changeMC() {
    randSize = Math.random()*300;
    _yscale = _xscale=randSize;
    _x = Math.random()*_root._width;
    _y = Math.random()*_root._height;
    clearInterval(displayTime);
    randomTimer();
    trace(randTime)
    updateAfterEvent()
    displayTime = setInterval(changeMC, randTime);
    }
    changeMC();
    stop();

    copy paste within your mc action's frame. if it doesn't work i'll email u an fla.

View thread