Window.deletePopUp()

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX 2004.

Usage

windowInstance.deletePopUp()

Parameters

None.

Returns

Nothing.

Description

Method; deletes the window instance and removes the modal state. This method can be called only on Window instances that were created by PopUpManager.createPopUp().

Example

The following example creates a modal window and then defines a click handler that calls the deletePopUp() function to delete the window. You drag a Window component from the Components panel to the current document's library, and then add the following code to Frame 1:

/**
 Requires:
  - Window component in library
*/

import mx.managers.PopUpManager;
import mx.containers.Window;

System.security.allowDomain("http://www.flash-mx.com");

var my_win:MovieClip = PopUpManager.createPopUp(this, Window, true, {closeButton:true, contentPath:"http://www.flash-mx.com/images/image1.jpg"});
var winListener:Object = new Object();
winListener.click = function() {
 my_win.deletePopUp();
};
my_win.addEventListener("click", winListener);