i wanted to drag and move duplicated movieclips but was unable to do it. But i able to duplicate movieclip on the stage. Is there anyone who can show me how or could direct me to any tutorial site.
Below is my code is there steps which i miss out that unable me to move and drag my duplicate movieclips?
var mySelection = “”;//Global declaration
var totalmc = 0;
var depth = 40;
wire.onPress = function ()
{
this.createEmptyMovieClip([“mc”+totalmc], this.getNextHighestDepth(mc)); //Create a newMovieClip with variable name “mc1"”
duplicate(mc);
//trace([“mc”+totalmc]);
mc = attachMovie(“idwire”, [“wire”+totalmc++], this.getNextHighestDepth(mc)); //store the Movie into mc1 by attaching
mc._x = 273;//(Stage.width - mc1._width)/2;
mc._y = 196.5;//(Stage.height - mc1._height)/2; //setting the corrdinates for x and y axis
dragging(mc); //calling the dragging function
//trace(mc1._x +","+ mc1._y);
//trace(mc1._width +","+ mc1._height);
}
//Function for dragging
function dragging(mc)
{
mc.onPress = function()
{
this.startDrag(true);
mySelection = this;
}
mc.onRelease = mc.onReleaseOutside = function()
{
stopDrag();
}
}
//Function for getting nxt highest depth
function getNextHighestDepth()
{
depth++;
return depth;
}
function duplicate(mc)
{
mc.duplicateMovieClip ([“mc”+i], i);
i++;
//trace(“mc”+i);
//trace(x);
}
//Btn function for flipping
flip.onRelease = function()
{
mySelection._rotation += 10;
}
//Btn function for delete
del.onRelease = function()
{
mySelection.removeMovieClip();
}