Dude, i give up. Help with drag and drop duplicate movie clip please

ok, i have been trying to get this to work forever. What im doing here is making a flash site thats like a real time strategy game. You have to build stuff in order to unlock new sections of the site.

check out this: http://www.rasterica.com/thomas/quarter_6_docs/RTS_Nav/new.html

click on build, then drag the Main button and release somewhere above. Notice that when you release it sticks to the cursor and doesnt stop dragging. Now, hit cancel and notice that the main clip is still loaded and works correctly if you drag and drop it.

on (press) {
_root.drag_main.duplicateMovieClip(“main1”, 2)
_root.main1.startDrag();
}
on (release) {
stopDrag();
_root.main1.gotoAndPlay(5);
}
this works perfectly on an object that isnt duplicated. It seems when you first duplicate a movie clip and immediately tell it to startDrag something messes up.

What im going for here is when you release, it goes to the animation. But for some reason its conflicting with something else when i load it the first time.

FLA- http://www.rasterica.com/thomas/quarter_6_docs/RTS_Nav/new.fla

also, if i finally get this issue worked out, will I be able to make the duplicated clip no longer dragable and just make it link to the certain section of the site?

any insight?

 on (press) {
_root.drag_main.duplicateMovieClip("main1", 2)
_root.main1.startDrag();
}
on (release) {
stopDrag();
_root.main1.gotoAndPlay(5);
}

Is this code applied on the ‘main’ button?
The user can drag as many copies of any object as he wants?

yea, i’m trying to make it so you can only do it once too.

just include avariable/if statement:

in the on(Release) put in sumitlike

maindropped = true

then on your on(Press) have sumit like

if(maindropped!=true){
}

wrapped around the rest of your code.
this will allow the user to only do it once… also, if need be you can reset the variable and let them drag one out again (ie. if they delete it or erase it or whatever ;))

Prophet.