5 Replies Latest reply on Oct 9, 2007 11:32 PM by DarthTurtle

    duplicating movie clips

    DarthTurtle
      I was wondering how do you duplicate movieclips in a certain location in flash
      can anyone help me with the coding and it would be nice if you could explain it to me! :D
        • 1. Re: duplicating movie clips
          AScracker
          you can use" duplicateMovieClip" Function for duplicate the movieclips
          ~~Sk
          • 2. Re: duplicating movie clips
            balamurugan@flipdesign.in
            duplicateMovieClip(target:String, newname:String, depth:Number) : Void
            duplicateMovieClip(target:MovieClip, newname:String, depth:Number) : Void

            syntax for duplicate movieclip...
            • 3. Re: duplicating movie clips
              DarthTurtle Level 1
              ummm.....
              i dont know actionscipt well so i dont know what's supposed to go in
              (target:String, newname:String, depth:Number) : Void

              I dont know what all that means....
              could you give me an example?
              • 4. Re: duplicating movie clips
                AScracker Level 1
                Hi Darth
                // Code here

                // Create the Movie Clip in Run time....
                this.createEmptyMovieClip("clip_mc", _root.getNextHighestDepth());
                clip_mc.beginFill(0xFF0000);
                clip_mc.moveTo(10, 10);
                clip_mc.lineTo(100, 10);
                clip_mc.lineTo(100, 100);
                clip_mc.lineTo(10, 100);
                clip_mc.lineTo(10, 10);
                clip_mc.endFill();

                // Duplicate the Movie Clip
                duplicateMovieClip(clip_mc, "clip_NewMc", _root.getNextHighestDepth());
                clip_NewMc._x = 200;

                duplicateMovieClip(clip_mc, clip_NewMc, _root.getNextHighestDepth())

                1) clip_mc -------> Your Movieclip Name created in run time,
                2) clip_NewMc------> Your Duplicated MovieClip name....
                3) _root.getNextHighestDepth()-------> Depth of the Movie Clip name

                ~~Sk
                • 5. Re: duplicating movie clips
                  DarthTurtle Level 1
                  so i would put this in the movie clip right?
                  following your second example
                  " // Duplicate the Movie Clip
                  duplicateMovieClip(clip_mc, "clip_NewMc", _root.getNextHighestDepth());
                  clip_NewMc._x = 200; "

                  why dont i have to put a number for _root.getNextighestDepth()); ?
                  is it because it automaticly gets a depth?
                  and could i put

                  duplicateMovieClip(clip_mc, "clip_NewMc", _root.getNextHighestDepth());
                  clip_NewMc._x = 200;
                  clip_NewMC._y = 10;

                  ????
                  Thanks for helping me :D
                  because I'm still learning.