3 Replies Latest reply on May 22, 2006 8:37 AM by Bhavzzz

    Random button movement

    Bhavzzz
      Hi,

      I'm new to flash and wanted to know if it was possible to create a button that moves randomly around the screen and when clicked opens an swf file, I have managed to create this random movement but it only works with a movie clip and not with a button. Any help at all would be greatly appreciated and thank you in advance.
        • 1. Re: Random button movement
          Level 7

          "Bhavzzz" <webforumsuser@macromedia.com> wrote in message
          news:e4qnr8$is7$1@forums.macromedia.com...
          > Hi,
          >
          > I'm new to flash and wanted to know if it was possible to create a button
          > that
          > moves randomly around the screen and when clicked opens an swf file, I
          > have
          > managed to create this random movement but it only works with a movie clip
          > and
          > not with a button. Any help at all would be greatly appreciated and thank
          > you
          > in advance.
          >

          If you have achieved the desired random movement with the movieclip then I
          suggest you stick with it instead of attempting to do the same with a
          button. The reason... a button is a movieclip with lesser abilities. A
          movieclip can do anything a button can do, so let us know what your desire
          is with the button and perhaps we can help you to recreate this same
          behavior with an MC instead.


          • 2. Re: Random button movement
            nudnic Level 1
            Movieclips can act as buttons. Use the onRelease callback function to give it a click action like this:

            • 3. Re: Random button movement
              Bhavzzz Level 1
              Hi ACB,

              Thanks for your help and Nurdic as well. It’s good to know that I can have the movieclip act like a button, but how??, I tried what Nurdric suggested but with no luck. What I want the movieclip to do is when the user clicks on it, it would open up a specific swf file. I have managed to create the random movement for the movieclip and also get a normal button to open an swf file however the problem I have is getting the movie clip to act like a button. Hope you can help.