PDA

View Full Version : dragging duplicatemovieclips


anthonypeter
02-25-2005, 08:52 AM
Hi Everybody! I am new to this forum. This is my first post.

I am doing a project right now and i've a small problem .The problem is that I want to drag many number of duplicate
movieclips from a original one with out disturbing the original.Also the duplicate movieclips should rotate on holding down the space bar and clicking on them .Each of the duplicated clips should be independent and when we click on a particular movieclip and drag ,only that movieclip should drag and rotate .I got the rotation part and the dragging part but couldnt make multiple movieclips and drag them independently.

Can someone plz help me with this. Also Iam not well versed with scripting so plz explain me the concepts.

Its very urgent.. plz help me...

Thankyou
Anthony.

saumya
02-25-2005, 09:36 AM
I assume that u have a clip on stage.say mcClip.

now in the first frame write this

var i:Number = 0;
Clip_mc.onPress = function() {
i++;
this.duplicateMovieClip("Clip"+i+"_mc", _root.getNextHighestDepth(), {_x:_root._xmouse, _y:_root._ymouse});
_root["Clip"+i+"_mc"].startDrag();
};
Clip_mc.onRelease = function() {
_root["Clip"+i+"_mc"].stopDrag();
};
Clip_mc.onReleaseOutside = function() {
_root["Clip"+i+"_mc"].stopDrag();
};

anthonypeter
02-28-2005, 05:11 AM
Hi saumya,
Thankyou verymuch for your code ...i got the movie clip to be duplicated ..its working really fine.Hats off to you.. .Also if you dont mind there is another problem..i want the movieclips to be rotated .When we press some key and click on them each duplicated movieclips should rotate seperately independent of each other .That means when i click on one duplicated movieclip only that one should rotate and not other movieclips..I am working on it but couldn't find the solution.Can you please help me with this....

Thank you,
Anthony.