Centered pop up - trouble with external swf

Hi all,

I used the kirupa centered pop up tutorial and it works fine. But I am using it in an external swf that is loaded into my main website. And for this reason, the pop up function, that works on the movie alone, won’t work while loaded in my website.

Since I don’t know much about actionscript, I’m just guessing that it might have something to do with this script.


_root.[COLOR=#000050]openWinCentre[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#006610]function[/COLOR] [COLOR=#0000ff]([/COLOR][COLOR=#0000d0]url[/COLOR], [COLOR=#000050]winName[/COLOR], [COLOR=#000050]w[/COLOR], [COLOR=#000050]h[/COLOR], [COLOR=#000050]toolbar[/COLOR],
[COLOR=#000050]location[/COLOR], [COLOR=#000050]directories[/COLOR], [COLOR=#0000d0]status[/COLOR], [COLOR=#000050]menubar[/COLOR], [COLOR=#000050]scrollbars[/COLOR], [COLOR=#000050]resizable[/COLOR][COLOR=#0000ff])[/COLOR]
[COLOR=#0000ff]{[/COLOR] [COLOR=#0000d0]getURL[/COLOR] [COLOR=#0000ff]([/COLOR][COLOR=#666666]"javascript:var myWin; if(!myWin || myWin.closed)[/COLOR]
[COLOR=#666666]{myWin = window.open('"[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#0000d0]url[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#666666]"','"[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#000050]winName[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#666666]"','"[/COLOR] [COLOR=#0000ff]+[/COLOR]
[COLOR=#666666]"width="[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#000050]w[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#666666]",height="[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#000050]h[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#666666]",toolbar="[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#000050]toolbar[/COLOR] [COLOR=#0000ff]+[/COLOR]
[COLOR=#666666]",location="[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#000050]location[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#666666]",directories="[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#000050]directories[/COLOR] [COLOR=#0000ff]+[/COLOR] 
[COLOR=#666666]",status="[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#0000d0]status[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#666666]",menubar="[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#000050]menubar[/COLOR] [COLOR=#0000ff]+[/COLOR]
[COLOR=#666666]",scrollbars="[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#000050]scrollbars[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#666666]",resizable="[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#000050]resizable[/COLOR] [COLOR=#0000ff]+[/COLOR]
[COLOR=#666666]",top='+((screen.height/2)-("[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#000050]h[/COLOR][COLOR=#0000ff]/[/COLOR][COLOR=#991010]2[/COLOR] [COLOR=#0000ff]+[/COLOR]
[COLOR=#666666]"))+',left='+((screen.width/2)-("[/COLOR] [COLOR=#0000ff]+[/COLOR]
 [COLOR=#000050]w[/COLOR][COLOR=#0000ff]/[/COLOR][COLOR=#991010]2[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#666666]"))+'"[/COLOR] [COLOR=#0000ff]+[/COLOR] [COLOR=#666666]"')}else{myWin.focus();};void(0);"[/COLOR][COLOR=#0000ff])[/COLOR]; [COLOR=#0000ff]}[/COLOR] 

Is it “_root” that needs to be changed to something else?

Hope someone can help me out with this. Thanks a lot.
Catherine