Duplicate MC does not share AS

I have the details in my flash and swf file, but I’ll explain what’s happening. If you click on the green “i”, it opens a window, you can drag the window by the top bar next to the exit and minimize. But unfortunately, if you close this window and open other (duplicate of MC), you can not move the window like you can on the original. My guess is that the AS does not carry onto the duplicate; I am stuck right here, if I can get this fixed, it will fix a lot of my other animations. I’ve been trying to search for this on Kirupa, but there are no results. I was hoping one of you guys could help me, please and thank you.

on (press) {
    bn = "window" add n;
    duplicateMovieClip("window", bn, n);
    setProperty("window", _y, "300");
    setProperty("window", _x, "400");
    n = Number(n)+1;
    set(bn add ":n", n);
    _root.window.grab.onPress = function(drag) {
        startDrag("_root.window");
    };
}

This AS is on the icon ( “i” ). The rest of the AS is on the window and its childs.
btw, this is my first submission, so if you guys can make it as simple as possible, TY.