# Problems with drag of multi-layered movie clip

**URL:** <https://forum.kirupa.com/t/problems-with-drag-of-multi-layered-movie-clip/269915>\
**Category:** flash\
**Created:** [September 3, 2008, 3:48am UTC](https://forum.kirupa.com/t/problems-with-drag-of-multi-layered-movie-clip/269915 "2008-09-03T03:48:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NYRick](https://avatars.discourse-cdn.com/v4/letter/n/2acd7d/32.png) [@NYRick](https://forum.kirupa.com/u/NYRick)\
**Post date:** [September 3, 2008, 3:48am UTC](https://forum.kirupa.com/t/problems-with-drag-of-multi-layered-movie-clip/269915/1 "2008-09-03T03:48:48Z")

</div>

I am relatively new to Actionscript 3.0 and Flash CS3 for that matter, and am trying a new project. I have looked through this forum, but haven’t found a similar post (maybe searched wrong).

I have an issue where I have an instance of a movie clip and the movie clip has multiple layers so that I can dynamically change the color of one part of the movie clip.

I can copy the movie clip which works fine, but when I try to drag the new instance, one layer moves while the other doesn’t, and then if I drag the layer that was left behind, it moves both layers (the first moved one now in its new position moves along relative to the second dragged part). I would like to have this new instance act as a whole movie clip to drag around.

It may be hard for me to explain properly so I included the .fla (which shows the movie clip I am trying to drag) and the code.

```auto

var colorTransform:ColorTransform = newCircle.transform.colorTransform;
var addedCircle_mc:MovieClip;

function colorChange(event:MouseEvent){
    colorTransform.color = 0x00ff00;
    newCircle.insideBack.transform.colorTransform = colorTransform;
}

color_btn.addEventListener(MouseEvent.CLICK, colorChange);
copy_btn.addEventListener(MouseEvent.CLICK, duplicateClickHandler);

function duplicateClickHandler(event:MouseEvent){
    addedCircle_mc = new Circle();
    addedCircle_mc.height = newCircle.height;
    addedCircle_mc.width = newCircle.width;
    addedCircle_mc.insideBack.transform = newCircle.insideBack.transform;
    addedCircle_mc.transform = newCircle.transform;

    addChild(addedCircle_mc);
    addedCircle_mc.x += 125;

    addedCircle_mc.addEventListener(MouseEvent.MOUSE_DOWN,myObjDrag);
    addedCircle_mc.addEventListener(MouseEvent.MOUSE_UP,myObjStop);
    addedCircle_mc.addEventListener(MouseEvent.ROLL_OUT,myObjStop);
}

function myObjDrag(event:Event){
    event.target.startDrag(false);
    event.target.parent.addChild(event.target);
}

function myObjStop(event:Event){
    event.target.stopDrag();
}

```

Any help to get this movie clip “whole again” would be greatly appreciated.
