Duplicating objects

Hi,

I am trying to duplicate an object (symbol) and have control of that symbol be passed to the one that was created.

I figured out how to drag and drop an object. I also figured out how to rotate that object each time you click on it.

I have found a code example on how to copy an object, but when I try to put it into my actionscript for a particular object I notice it will make a new one each time I click. That’s not good. I know that I need to have a master object, which when clicked and dragged will copy itself and allow you to now drag the copy around. But, and I know this is wrong but cannot wrap my head around a fix, when I add this copy code it simply makes a copy each an every time I click. A “Trouble with tribbles” scenario then unfolds. Each time I click to rotate I get a new instance.

Here is my code in all it’s un-glory

smiley_mc.onPress = function () {
i = i + 1;
duplicateMovieClip (_root.smiley_mc, “smiley_mc” + i, i);
startDrag(this);
_root.smiley_mc._rotation = _root.smiley_mc._rotation + 10;
}

smiley_mc.onRelease = function () {
stopDrag();
}

I already know, or at least I think I’m on the right path, that I need a master object. When clicked and dragged becomes the child. Which is then in turn able to be dragged at will and rotated at will without creating any new ones.

I’m trying to accomplish this task because it turned out to be too frustrating to start with the scrolling list of items which could then be clicked and become copies. One step at a time. First, the main function… copy the movie clip and pass control to that movie clip. Hopefully this can be done fairly easily.

I hope this makes sense and I hope someone can either show me what I need to do or give me a big enough hint to point me in the right direction. I would never ask anyone to just outright solve it unless they wanted to. Just a nudge, or maybe a whack with a good sized mallet.

Any takers?

Thanks in advance,

Bill