2020-10-20 00:58:15 +02:00

50 lines
1.4 KiB
ActionScript
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
Copyright (c) 2009 Yahoo! Inc. All rights reserved.
The copyrights embodied in the content of this file are licensed under the BSD (revised) open source license
*/
package com.yahoo.astra.fl.managers
{
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
//--------------------------------------
// Class description
//--------------------------------------
/**
* A utility for dealing with popups
* @author Alaric Cole
*
*/
public class PopUpManager
{
//--------------------------------------------------------------------------
//
// Class methods
//
//--------------------------------------------------------------------------
/**
* Pops up a top-level display object.
*
* @param popUp The DisplayObject to be popped up.
*
* @param parent DisplayObject to pop up above.
*
*/
public static function addPopUp(popUp:DisplayObject, parent:DisplayObjectContainer):void
{
parent.addChild(popUp);
}
/**
* Removes a popup window popped up by
* the <code>addPopUp()</code> method.
*
* @param popUp The DisplayObject representing the popup window.
*/
public static function removePopUp(popUp:DisplayObject):void
{
popUp.parent.removeChild(popUp);
}
}
}