2 Replies Latest reply on Dec 4, 2006 1:23 AM by Hugh Neale

    Buttons

    Hugh Neale Level 1
      Ok, I have a problem. :(

      Heres the code I have:

      var button1 = this.createEmptyMovieClip("button1", "button1", 3);
      loadMovie("button1.swf", "button1");
      button1._y = 65;
      button1._x = 415;
      _root.button1.onRelease = function() {
      trace("hi");
      };

      Now my problem arises because when I click the button it dosen't work. Why? and how do i fix this.

      Many Thanks.
      hugh.
        • 1. Re: Buttons
          Devendran Level 1
          Hi
          While loading a Content into a movie clip will remove all the variable and content of that target movie

          i.e if u wish to load a jpg/swf into a movie clip called "mcHolder_mc" will remove all the Content and variable stored in the mcHolder_mc. So you can't access it any more. Also the loading is independent function so We can't expect it will occur immediately after calling. So better to use load clip

          • 2. Re: Buttons
            Hugh Neale Level 1
            Yes! many thanks it works!