# How Do I add contextMenu to stage?

**URL:** <https://forum.kirupa.com/t/how-do-i-add-contextmenu-to-stage/260908>\
**Category:** flash\
**Created:** [May 20, 2008, 11:30pm UTC](https://forum.kirupa.com/t/how-do-i-add-contextmenu-to-stage/260908 "2008-05-20T23:30:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![longroper](https://avatars.discourse-cdn.com/v4/letter/l/b5a626/32.png) [@longroper](https://forum.kirupa.com/u/longroper)\
**Post date:** [May 20, 2008, 11:30pm UTC](https://forum.kirupa.com/t/how-do-i-add-contextmenu-to-stage/260908/1 "2008-05-20T23:30:45Z")

</div>

So in AS2 you could add a contextMenu for the whole movie like this:

```auto
var newMenu = new ContextMenu(); 
newMenu.hideBuiltInItems(); 
_root.menu = newMenu; 

```

There is no \_root in AS3. So in my Document class I tried this:

```auto

stage.contextMenu = new ContextMenu();

```

Which results in this error:

Error: Error #2071: The Stage class does not implement this property or method.  
at Error$/throwError()  
at flash.display::Stage/set contextMenu()

I have also tried just adding items to stage.contextMenu but that didn’t work either.

I also added a custom context menu to my Document class but that doesn’t work for the whole movie.

So does anyone know if there is something I can do to set the contextMenu for the whole movie?

---

<div class="post-metadata">

**Author:** ![Felixz](https://avatars.discourse-cdn.com/v4/letter/f/ecb155/32.png) [@Felixz](https://forum.kirupa.com/u/Felixz)\
**Post date:** [May 21, 2008, 10:27am UTC](https://forum.kirupa.com/t/how-do-i-add-contextmenu-to-stage/260908/2 "2008-05-21T10:27:15Z")

</div>

[http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/index.html?flash/ui/ContextMenu.html&flash/ui/class-list.html](http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/index.html?flash/ui/ContextMenu.html&flash/ui/class-list.html)

---

<div class="post-metadata">

**Author:** ![longroper](https://avatars.discourse-cdn.com/v4/letter/l/b5a626/32.png) [@longroper](https://forum.kirupa.com/u/longroper)\
**Post date:** [May 29, 2008, 1:15am UTC](https://forum.kirupa.com/t/how-do-i-add-contextmenu-to-stage/260908/3 "2008-05-29T01:15:03Z")

</div>

> [@Felixz;2329042](#):
>
> [http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/index.html?flash/ui/ContextMenu.html&flash/ui/class-list.html](http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/index.html?flash/ui/ContextMenu.html&flash/ui/class-list.html)

Thank you I am aware of the Adobe documentation and I read it before I posted. There is nothing in there that answers this question. I already know how to create a contextMenu and how to add one to a regular MovieClip or a Sprite. I am asking how to add one to the stage object.

Is there something in the documentation that I missed? If so could you reference it directly?
