drag and drop duplicates and swap depth problem
I have some drag and drop mc's that I want to duplicate but also to swap depth between them and also to stay bellow the item that are assign, the problem is that I used the code for swap depth but because it has " getNextHighestDepth " in it, only the first one is going where is suppose to go, the others stay at the top and if I click on the first one for the second time it stays on top and dosen't go under the item that I want. The drag and drop mc's are posted bellow the item. I also tried a different approach by trying to "tell them" where to go, but they don't duplicate anymore. How can I make it happen or what I'm doing wrong? Thank you so much for taking the time to help me.
Here is the first code:
var num = 0;
DDD2.onPress = function ()
{
++num;
duplicateMovieClip(DDD2, "DDD2" + num, _root.getNextHighestDepth());
_root["DDD2" + num].startDrag();
};
DDD2.onReleaseOutside = function ()
{
stopDrag ();
};
And here is the second code but they won't duplicate anymore:
var num = 0;
DDD2.onPress = function ()
{
++num;
duplicateMovieClip(DDD2, "DDD2" + num, _root.swapDepths(-15173));
_root["DDD2" + num].startDrag();
};
DDD2.onReleaseOutside = function ()
{
stopDrag ();
};
