[Flash 8]Cannot get nested buttons to work after duplicateMovieClip

Hello everyone,

This is my first time posting a question to a forum. I have done the due dilagence on this for the last couple of weeks and can’t seem to get it to work. I have a movie clip with a simple box and two buttons. The buttons rotate the box CW and CCW.

I want to be able to duplicate the mc, drag the duplicate on stage and and leave the original mc in place. I must be able to make multiple copies of the mc and then have them all be able to retain the button functionality of the original mc and still be individually draggable on stage.

I have the nested buttons working and I have the duplicate/drag-and-drop part working both in seperate .fla files. I cannot, however, for the life of me get them to work together.

Any help would be, of course, greatly appreciated.

Here is the code from the seperate .fla’s

This is my code for copying and retaining drag and drop functionality:

var i = 0;
var deskCopy:MovieClip;
desktest_mc.onPress = function() {
deskCopy = desktest_mc.duplicateMovieClip(“desk”+ i, ++i);
deskCopy._x = desktest_mc._x;
deskCopy._y = desktest_mc._y;
deskCopy.startDrag();
this._parent[“desk”+ i].onPress = function() {
this.startDrag();
}
this._parent[“desk”+ i].onRelease = function() {
this.stopDrag();
}
};
desktest_mc.onRelease = function() {
deskCopy.stopDrag();
};
desktest_mc.onReleaseOutside = function() {
deskCopy.stopDrag();
};

/* This copyies the original desktest_mc and allows all copies to drag and drop after copy */


This is the code for the movie clip itself:

_parent.desktest_mc.onPressHandler = function(){
trace(“hittest(full) was just pressed”);
}
// delegate to all children
_parent.desktest_mc.left_mc.onPress = function(){
_parent.hittest_mc.onPressHandler();
trace(“left button was just pressed”);
_parent.desktest_mc.table_mc._rotation -= 45;
}
_parent.desktest_mc.right_mc.onPress = function(){
_parent.desktest_mc.onPressHandler();
trace(“right button was just pressed”);
_parent.desktest_mc.table_mc._rotation += 45;
}
_parent.desktest_mc.table_mc.onPress = function(){
_parent.desktest_mc.onPressHandler();
trace(“table was just pressed”);
}


On this movie clip, I have the AS code in the mc itself. I don’t know if that matters or not, but that does not seem to be the issue as i have tried it numerous ways. Always work by itself, just not after a copy.
I assume the problem with the nested code is it doesn’t refer to the copies of itself properly.

Again, any help would be greatly appreciated!!!

Kai