# Duplicate or attachMovie with Context Menu

**URL:** <https://forum.kirupa.com/t/duplicate-or-attachmovie-with-context-menu/250408>\
**Category:** Uncategorized\
**Created:** [January 29, 2008, 10:42am UTC](https://forum.kirupa.com/t/duplicate-or-attachmovie-with-context-menu/250408 "2008-01-29T10:42:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yossarian](https://avatars.discourse-cdn.com/v4/letter/y/9de0a6/32.png) [@yossarian](https://forum.kirupa.com/u/yossarian)\
**Post date:** [January 29, 2008, 10:42am UTC](https://forum.kirupa.com/t/duplicate-or-attachmovie-with-context-menu/250408/1 "2008-01-29T10:42:18Z")

</div>

I’m trying to use the context menu to add textboxes to the stage. So far I’ve managed to create the menu item and get the MC to dynamically attach to the stage. However, I also wish to be able to create several clips, which it doesn’t. Can someone tell me how that could be achieved please?

```
ActionScript Code:
[FONT=Courier New][LEFT]root_cm = [COLOR=#000000] **new** [/COLOR] [COLOR=#0000FF]ContextMenu[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];

```

root\_cm.[COLOR=#0000FF]hideBuiltInItems[/COLOR]COLOR=#000000[/COLOR];  
root\_cm.[COLOR=#0000FF]customItems[/COLOR].[COLOR=#0000FF]push[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000] **new** [/COLOR] [COLOR=#0000FF]ContextMenuItem[/COLOR][COLOR=#000000]([/COLOR][COLOR=#FF0000]“Add note”[/COLOR], itemHandler[COLOR=#000000])[/COLOR][COLOR=#000000])[/COLOR];  
[COLOR=#000000] **function** [/COLOR] itemHandler[COLOR=#000000]([/COLOR]obj:[COLOR=#0000FF]Object[/COLOR], item:[COLOR=#0000FF]ContextMenuItem[/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]

```
[COLOR=#0000FF]attachMovie[/COLOR][COLOR=#000000]([/COLOR][COLOR=#FF0000]"text_ti"[/COLOR], [COLOR=#FF0000]"text_ti"[/COLOR], [COLOR=#000080]1[/COLOR][COLOR=#000000])[/COLOR];

```

[COLOR=#0000FF]this[/COLOR].[COLOR=#0000FF]\_x[/COLOR] = [COLOR=#000080]100[/COLOR];  
[COLOR=#0000FF]this[/COLOR].[COLOR=#0000FF]\_y[/COLOR] = [COLOR=#000080]100[/COLOR];  
[COLOR=#000000]}[/COLOR]  
[COLOR=#0000FF]\_root[/COLOR].[COLOR=#0000FF]menu[/COLOR] = root\_cm;  
[/LEFT]  
[/FONT]
