this["movieclip"+i].startDrag() + possable to move a movieclip to _root?

well, the headline says it all :stuck_out_tongue:

soory if this is a noobish question, just started with flash, but anyhow, here’s the code:

ActionScript Code:
[FONT=Courier New][LEFT]</p>
<p>onClipEventCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p> sail_mc.[COLOR=#0000ff]gotoAndStop[/COLOR]COLOR=#000000[/COLOR];</p>
<p> [COLOR=#000000]var[/COLOR] i:[COLOR=#0000ff]Number[/COLOR] = [COLOR=#000080]0[/COLOR]</p>
<p>[COLOR=#000000]}[/COLOR]</p>
<p>onClipEventCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p> [COLOR=#0000ff]onPress[/COLOR] = [COLOR=#000000]function[/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p> [COLOR=#808080]//copy if “main” movieclip</p>[/COLOR]
<p> [COLOR=#0000ff]if[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000ff]_name[/COLOR] == [COLOR=#ff0000]“yellowboat_mc”[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p> i++;</p>
<p> [COLOR=#0000ff]duplicateMovieClip[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000ff]this[/COLOR],[COLOR=#ff0000]“yellowboat_mc”[/COLOR]+ i,i[COLOR=#000000])[/COLOR]</p>
<p> [COLOR=#0000ff]startDrag[/COLOR][COLOR=#000000]([/COLOR][COLOR=#0000ff]_root[/COLOR].[COLOR=#000080]yellowboat_mc[/COLOR][COLOR=#000000][[/COLOR][COLOR=#ff0000]“yellowboat_mc”[/COLOR]+ i[COLOR=#000000]][/COLOR],[COLOR=#000000]true[/COLOR][COLOR=#000000])[/COLOR]</p>
<p> [COLOR=#000000]}[/COLOR]</p>
<p> [COLOR=#808080]//else drag it</p>[/COLOR]
<p> [COLOR=#0000ff]else[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p> [COLOR=#0000ff]startDrag[/COLOR]COLOR=#000000[/COLOR]</p>
<p> [COLOR=#000000]}[/COLOR]</p>
<p> [COLOR=#000000]}[/COLOR]</p>
<p>[COLOR=#000000]}[/COLOR]</p>
<p>onClipEventCOLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]</p>
<p> [COLOR=#0000ff]stopDrag[/COLOR]COLOR=#000000[/COLOR]</p>
<p>[COLOR=#000000]}[/COLOR]</p>
<p>
[/LEFT]
[/FONT]

as you probably have guessed, its a main boat, under a draggable menu. When i press this boat I want it to copy itself, and then drag it. If it’s not the main movieclip, simply drag it.

i allso have another problem, as all the copied boats will follow the menu as it is draggable, is it any way to move the copied boats to _root timeline?

excuse my bad english, and thanks at advance :sailor:

PS:thanks for great site, evrything ive learnd so far, is from here :pleased: