1 Reply Latest reply on Jan 31, 2007 2:17 PM by Xeronar

    ActionsScript help!

    andrePT
      i want to move a movieclip in the stage area from one position to another when i click on another movieclip! i know the theory but i could use some help with the code plz!

      so it is suposed to be like this (i think)...

      on(realease) {
      gotoAndPlay(2); // for example!
      "movieclip 2" go to x,y position! <- this is the code i need!
      }

      thanks in advance
        • 1. Re: ActionsScript help!
          Xeronar
          you might be able to use this code on the button:

          on(release) {
          _root.(moving movieclip name) _x = (number);
          _root.(moving movieclip name) _y = (number);
          }

          but an easier way is to make the moving movieclip have 2 frames, one where it is in its starting position and one where you want it to move to after clicking the button, then you can put this code on the button:

          on(release) {
          _root.(moving movieclip name) gotoAndStop(2);
          }

          note: if the frame inside the movieclip when the object moves is not 2, just change the number.

          i hope this helps, but i cant really tell you any more without knowing more about what exactly you are trying to do, stuff like movieclip names, wether it is a flash on its own or a part of a more complex flash... stuff like that.