5 Replies Latest reply on May 3, 2013 12:31 PM by teeronline

    duplicate movie clip problem

    teeronline Level 1

      I can't believe as simple as it may sound I needed help!

       

      on stage:

      #1 button1

      #2 clipT ( this is what I want to copy)

      #3 mc ( target mc that i want copy clipT to)

       

      stop();

         

      button1.onRelease = function () {

      duplicateMovieClip (clipT, "clipT2", 0);

      mc.attachMovie(clipT2);

       

      }

       

      it doesn't do anything, if I use mc.loadMovie(clipT2), it gives me error  cannot find **/**/***/***/level0.clipT2

       

      whats going on?

        • 1. Re: duplicate movie clip problem
          Ned Murphy Adobe Community Professional & MVP

          You probably need to reasd the help documentation for the various functions you are trying to use so that you can see what they do and how they don't do what you are trying to get them to do.  Try some of the example from the help documents too so that you can see how they work.

          • 2. Re: duplicate movie clip problem
            teeronline Level 1

            hi, thanks

             

            but that doesn't really help, becasue I need to know what should I be looking for, stick with duplicateMovieClip and attachMovie? or should i try different functions? I wasn't sure attachMovie is what I need to begin with.

             

            both clipT and mc are on stage, I want to copy clipT and put the copy into mc.

             

            It seem to me loadMovie only work with external movie clip.

            • 3. Re: duplicate movie clip problem
              teeronline Level 1

              button1.onPress = function () {

              var dupe = this.duplicateMovieClip("dupe", 1000, {_x:this._x, _y:this._y});

               

              mc.attachMovie("dupe", "dupe2", 1000);

               

              }

               

              I don't understand, why it doesn't do the 'job', 'dupe' is a copy of 'button1', and 'mc' attach 'dupe' inside itself? what have i done wrong? there s no error, no output, but 'mc' doesn't change a thing

              • 4. Re: duplicate movie clip problem
                Ned Murphy Adobe Community Professional & MVP

                What you need to know is how to use the help documents - then you can help yourself be more sure of what things do and do not do. 

                 

                If you do what I said, you will find that attachMovie recreates a movieclip from the library, not the stage.  It uses a linkage that you assign in the properties panel.  It has no relationship with duplicateMovie or any object you might ccreate using it.

                 

                If you look up the duplicateMovieClip function then you will find examples of how to use it properly.

                • 5. Re: duplicate movie clip problem
                  teeronline Level 1

                  Hi Ned, thanks the reply

                   

                  yeah after I look it up, you have to set identifier ID for that mc in liberary, it wasn't my intention, as duplicateMovie can make a copy of anything on stage, and I could add startDrag to move the copy around without problem, but only when it come to attach it into a different clip that i failed no matter what I tried.  To me it makes no sense that you could copy a mc but not able to swap it with other mc.

                   

                  but this method could do it anyway

                   

                  thank you