I'm trying to add a popup to my flex application. I'm trying to do it from a class file, so I'm adding to the application:
_langTools = new LanguageTools(); _langTools = PopUpManager.createPopUp(Application.application as DisplayObject, LanguageTools, false) as LanguageTools; PopUpManager.centerPopUp(_langTools);
However, I get two errors when I do this, 1118: Implicit coercion of a value with static type Object to a possible unrelated type flash.display:DisplayObject and 1120:Access of undefined property DisplayObject. Application.application does not want to become a DisplayObject. How do I fix this?
PS. LanguageTools extends TitleWindow
Application isn't a DisplayObject, so this is entirely expected. If your PopUp is modal, then you may want to reassess your approach.