# Contextmenu council

**URL:** <https://forum.kirupa.com/t/contextmenu-council/214205>\
**Category:** Uncategorized\
**Created:** [January 26, 2007, 8:37am UTC](https://forum.kirupa.com/t/contextmenu-council/214205 "2007-01-26T08:37:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![caraffa](https://avatars.discourse-cdn.com/v4/letter/c/96bed5/32.png) [@caraffa](https://forum.kirupa.com/u/caraffa)\
**Post date:** [January 26, 2007, 8:37am UTC](https://forum.kirupa.com/t/contextmenu-council/214205/1 "2007-01-26T08:37:52Z")

</div>

Hi !

It is possible to create a menu in the contextmenu making it possible to create a window (component…) ?

example:  
function tab()  
{  
}  
//CREATE FUNCTION FOR THE FIRST URL  
function url1()  
{  
getURL(“[mailto:info@youremailaddress.com](mailto:info@youremailaddress.com)”);  
}  
//CREATE FUNCTION FOR THE SECOND URL  
function url2()  
{  
**[COLOR=red]win = mx.managers.PopUpManager.createPopUp(this, mx.containers.Window, true,{\_name: “myWin”, \_x:00, \_y:00, \_width:560, \_height:320, closeButton:true, title:“Welcome”, contentPath:“mymenu.swf”})  
closeWin = new Object();  
closeWin.click = function(){  
win.deletePopUp();  
}  
win.addEventListener(“click”, closeWin);[/COLOR]**  
**[COLOR=red]}  
[/COLOR]**  
var expand = new ContextMenu();  
expand.hideBuiltInItems();  
var $tab1 = new ContextMenuItem("Welcome ", tab, false, false, true);  
var $tab2 = new ContextMenuItem(“My window component”, tab, false, false, true);  
expand.customItems.push($tab1, $tab2);  
expand.onSelect = menuHandler;  
\_root.menu = expand;

This code does not go but is 'it possible to do it?

Thank you for your help
