# Can't close popup-window! HEEEEELP!

**URL:** <https://forum.kirupa.com/t/cant-close-popup-window-heeeeelp/39372>\
**Category:** Uncategorized\
**Created:** [January 6, 2004, 7:21pm UTC](https://forum.kirupa.com/t/cant-close-popup-window-heeeeelp/39372 "2004-01-06T19:21:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gosche](https://avatars.discourse-cdn.com/v4/letter/g/46a35a/32.png) [@gosche](https://forum.kirupa.com/u/gosche)\
**Post date:** [January 6, 2004, 7:21pm UTC](https://forum.kirupa.com/t/cant-close-popup-window-heeeeelp/39372/1 "2004-01-06T19:21:00Z")

</div>

Hi, I have a problem with a button in Flash. I can open a popup window, but I can’t close it again!

Ok… I’ve got this button… I have given it the following function (to open a popup window with a given path)

Looks like this:

on (release){  
pictWin = mx.managers.PopUpManager.createPopUp(\_root, mx.containers.Window, true, {closeButton:true, contentPath:“c:/Picture01.JPG”, title:“Picture01SOMETHING” });  
pictWin.setSize(700,550);  
}

… and it works great!!!

The Popup window opens as it should.  
But I can’t close it again.

I have given frame 1 the following:

xListener = new Object();  
xListener.release = function(){  
pictWin.deletePopUp();  
}  
pictWin.addEventListener(“release”, xListener);

… This should close it right (delete), when I click close…… ??? Well, nothing happens ! ! !

Can someone help me…I would REALLY appreciate it.
