# AS2: Menu Component & Window Component

**URL:** <https://forum.kirupa.com/t/as2-menu-component-window-component/213120>\
**Category:** flash\
**Created:** [January 17, 2007, 2:17am UTC](https://forum.kirupa.com/t/as2-menu-component-window-component/213120 "2007-01-17T02:17:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![davydany](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@davydany](https://forum.kirupa.com/u/davydany)\
**Post date:** [January 17, 2007, 2:17am UTC](https://forum.kirupa.com/t/as2-menu-component-window-component/213120/1 "2007-01-17T02:17:00Z")

</div>

well, I had a question Yesterday, and posted in the Flash 8 Section of this forum…well, I have a question now…When I open a Window Component(with a movie clip inside it …ofcourse) via Popup Manager from the Menu Component, the Window opens up, but I can’t go back to the menu and open it. Any suggestions on how?

Here is a part of my code (which I believe will summarize the rest of my code):

```php

import mx.controls.Menu;
import mx.controls.MenuBar;
import mx.managers.PopUpManager;
import mx.containers.Window;

var myProfile:Menu = my_mb.addMenu("File");
myProfile.addMenuItem({label:"Open", instanceName:"openInstance"});

var mbListener:Object = new Object();
mbListener.change = function(evt_obj:Object) {
 var menuItem_obj:Object = evt_obj.menuItem;
 switch (menuItem_obj.attributes.instanceName) {
  case "seemyProfileInstance":
    var my_win:MovieClip = mx.managers.PopUpManager.createPopUp(evt_obj.target, Window, true, {title:"Open Document", contentPath:"openDialog", closeButton:true});
    my_win.setSize(320, 240);
    
    var winListener:Object = new Object();
    winListener.click = function() 
    {
        my_win.deletePopUp();
    };
    my_win.addEventListener("click", winListener);

  break;

```
