# 2 windows opening now from proj

**URL:** https://forum.kirupa.com/t/2-windows-opening-now-from-proj/58501
**Category:** flash
**Created:** [July 23, 2004, 1:49am UTC](https://forum.kirupa.com/t/2-windows-opening-now-from-proj/58501 "2004-07-23T01:49:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jdl](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@jdl](https://forum.kirupa.com/u/jdl)
#### Post date: [July 23, 2004, 1:49am UTC](https://forum.kirupa.com/t/2-windows-opening-now-from-proj/58501/1 "2004-07-23T01:49:08Z")

</div>

:bad:

OH dear…  
Why would this be?

Putting this on the button:

on (release) {  
getUrl(flash.html);  
address = “flash.html”;  
target\_winName = “flash”;  
width = 650;  
height = 350;  
toolbar = 0;  
location = 0;  
directories = 0;  
status = 0;  
menubar = 0;  
scrollbars = 0;  
resizable = 0;  
openWinCentre(address, target\_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);  
}

and then putting this on the action layer:

\_global.openWinCentre = function(url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {  
getURL(“javascript:window.open(’”+url+"’,’"+winName+"’,’"+“width=”+w+",height="+h+",toolbar="+toolbar+",location="+location+",directories="+directories+",status="+status+",menubar="+menubar+",scrollbars="+scrollbars+",resizable="+resizable+",top=’+((screen.height/2)-("+h/2+"))+’,left=’+((screen.width/2)-("+w/2+"))+’"+"’);void(0);");  
};

The Pop UP works when I do this through the projector! BUT I get TWO windows opening - first the browser window (from geturl command ) and then the popup .

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 23, 2004, 4:39pm UTC](https://forum.kirupa.com/t/2-windows-opening-now-from-proj/58501/2 "2004-07-23T16:39:34Z")

</div>

i think you’re over complicating things…

get rid of that code on your actions layer and try it again…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 14, 2004, 7:00am UTC](https://forum.kirupa.com/t/2-windows-opening-now-from-proj/58501/3 "2004-08-14T07:00:43Z")

</div>

What is happening is there is no way of having a popup in flash unless html and java based

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 14, 2004, 8:15pm UTC](https://forum.kirupa.com/t/2-windows-opening-now-from-proj/58501/4 "2004-08-14T20:15:24Z")

</div>

Java **script** you mean. Java != Javascript. Stupid people who named them the same… And he IS using javascript- “javascript:” at the front of a url will execute the following code as javascript.

That being said… flash can execute javascript on the html page it is embedded in with fscommands, I think. I have never done it myself, I would suggest a look on google.
