I am trying to center a popup window on the application from an
itemrenderer in a TileList.
It looks like it centers it with the TileList but not with the
application itself.
I've found different places on the interweb but none of them work.
They reference: DisplayObject(Application.application.parentDocument),
this.parent, etc...and they give me the same results.
Here is my code:
private function showPic():void {
var author:String = data.author;
//var newPicWindow:TitleWindow =
TitleWindow(PopUpManager.createPopUp(this, bigPic, true));
var newPicWindow:TitleWindow =
TitleWindow(PopUpManager.createPopUp(Application.application.mainPanel,
bigPic, true));
newPicWindow.data = data;
if (author != null) {
newPicWindow.title="Photo Courtesy of "
+ data.author;
}
newPicWindow.setStyle("borderAlpha", 0.9);
newPicWindow.showCloseButton=true;
PopUpManager.centerPopUp(newPicWindow);
}
Thanks,
Sonny