Try this: var newPicWindow:TitleWindow = TitleWindow(PopUpManager.createPopUp(UIComponent(this.parentApplication), TitleWindow, true)); ~randy _____
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of rueter007 Sent: Friday, December 21, 2007 4:26 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: centerPopUp in F3B2 not sure if this works but have you tried this.parentApplicat-ion? - venkat HYPERLINK "http://www.venkatj.com"http://www.venkatj.-com --- In HYPERLINK "mailto:flexcoders%40yahoogroups.com"[EMAIL PROTECTED], "hammer995" <[EMAIL PROTECTED]> wrote: > > 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 > No virus found in this outgoing message. Checked by AVG. Version: 7.5.516 / Virus Database: 269.17.6/1192 - Release Date: 12/21/2007 1:17 PM