3 Replies Latest reply on Jan 25, 2007 4:12 PM by SwedKim

    A second attached movie comes at the x=0, y=0 corner

    SwedKim Level 1
      I made a movie and I have attached it successfully to the document by using "attachMovie. This movie should appear when I click on a button. The problem is that when I click a second time a second movie comes on x=0/y=0 corner of the frame.
      Can anyone help me to fix this... This problem is killing...
      Many thanx....
        • 1. Re: A second attached movie comes at the x=0, y=0 corner
          DZ-015 Level 1
          ok, so you are doing something like:

          this.attachMovie("yourMovieClipID", "mcInstanceName", this.getNextHighestDepth());

          what you need to do next is:
          mcInstanceName._x = your_X_coordinate_goes_here;
          mcInstanceName._y = your_Y_coordinate_goes_here;

          Also, throw in some conditional logic. Like, put the whole thing in a if statement so that you don't have to worry about new instances coming up. Bear in mind, there can only be one movie clip with a given instance name in any one place... just like files on your computer.

          I hope I've helped, if not, please give more details on your problem.
          • 2. Re: A second attached movie comes at the x=0, y=0 corner
            SwedKim Level 1
            Yeeeeeeees, I solved the problem. For those who will have the same problem and searching here, my code was as following
            var informationButton:MovieClip = _root.attachMovie("moreInfoButton", "displayInfo",this.getNextHighestDepth());

            I changed the getNextHigehestDepth() to 0 and that was it. It is fixed hyyyhaaa.
            Now I have to go and stuy what this getNextHig... is? because it took me a whole day to solve this problem..
            • 3. Re: A second attached movie comes at the x=0, y=0 corner
              SwedKim Level 1
              Thanx DZ-015
              Well as you see, I solve the problem. Don't ask me to explaing because I was just lucky otherwise my knowledge in Object Oriented as Actionscript is not the best. But I manage to do some stuff here without understanding the concept...
              Thanx anyway...