3 Replies Latest reply on Apr 14, 2007 11:19 PM by kglad

    Button Problem

    Flash Cus
      Ok, so i was experimenting with the random function. I decided to create a circle (converted to movie clip), and a button. My idea was to push the button, and the circle would move to a random point on the screen. I have the standard 550x400 size, and my code is the following:

      xrand = random(551);
      yrand = random(401)

      btn.onRelease = function()
      {
      cir._x = xrand;
      cir._y = yrand;
      };

      It seems to work, but it only works once. After that the button does nothing. I've tried converting the button to a movie clip. Is there something wrong with my actionscript?

      Cheers