How to duplicate click and dragged objects? Help Needed!


I’m supposed to create something like this:

  1. Create 4 coat of arms (Shields)
  2. Pour colour onto different segments of the shields
  3. Click and drag objects onto the shield
  4. Print

My problems lies in step 3.

How do I actually [COLOR=darkred]create multiple copies of the same object that I clicked and dragged[/COLOR]? At the same time, I also want the original copy to stay in position so I will only need to click and drag on the original copy to create the duplicates.

I got the code from the net (I’m no pro in this). What I did was, convert the object into a button, then into a movie clip. Double-clicked the movie clip, I inserted the following code on the movie clip:

[COLOR=navy]on(press) {[/COLOR]

Then on the movie clip’s frame, I inserted this:

[COLOR=navy]function duplicate(item) {[/COLOR]

[COLOR=navy]_global.newone = item.duplicateMovieClip(“myClip” + numberOfClips + “_mc”, numberOfClips);[/COLOR]

[COLOR=navy]newone._alpha = 60;[/COLOR]

[COLOR=navy]newone.onMouseUp = function() {[/COLOR]
[COLOR=navy]newone._alpha = 100;[/COLOR]
[COLOR=navy]this.onMouseUp = null;[/COLOR]

[COLOR=navy]newone.onPress = function() {[/COLOR]
[COLOR=navy]_root.current_item = this;[/COLOR]

[COLOR=navy]newone.onRelease = function() {[/COLOR]



This works BUT when I tried to click and drag other objects, the previous object dragged onto the shield goes missing. Some objects though, stayed. The end product is a bit messy.

btw, I don’t really understand the above code. Is there any way to modify the code or create any other new code for this to work?

Help me…please…:frowning:

hi, I was wondering if anybody could help me on expanding on this. This works fantastically but I was wondering if there is a way to get it so that each new object made is draggable as well?