PDA

View Full Version : targeting a new, named window from a projector/exe


rcochran
01-09-2002, 10:49 PM
i'm developing a CD in flash with multiple links to external web content.

assuming that a browser isn't running, i want the getURL statement to name the new browser window that pops up so that subsequent URL requests will load in the same window.

so far, none of the standard options work (_top, _parent, or _self, etc.) nor does simply naming it (e.g. "foo".) the last option will work to create a new named instance of a browser window from a clicked href within HTML, then allowing targeting. i would expect it to work the same way in this case, but it is not.

here's what is happening instead: in all cases, additional links that i click open additional browser windows, no matter what target parameters that i pass.

does anybody have any ideas? any and all help is much appreciated. thanks.

Jesse
01-10-2002, 01:35 AM
You would have to launch a browser and in that browser open a (HTML) document which uses Javascript to launch a named sub-window. As far as I'm aware you can't launch a named window from the projector itself.

rcochran
01-10-2002, 03:58 PM
thanks Jesse. i was actually thinking of that, where the new browser would load a blank page that spawns the named window then closes itself, but due to security checks, it isn't possible to close the parent without a confirmation dialog.

perhaps i can just open the browser window, resize and move it, and then popup the required URL in a named window on top. just have to write an if-then to check if the browser window exists for targeting purposes.

thanks for all your help... this one is a great challenge.

-Randy.

tonyota
01-19-2002, 06:19 PM
Here is something Andre V. helped me out with:

+++++++++


If your CD-ROM project is intended for Windows user only, you can use a .hta
(Hyper Text Application) file to open the popup window.

Start a new document with Notepad and paste the following code :
<HTML>
<HEAD>
<TITLE>Window Oponer</TITLE>
<HTA:APPLICATION ID="openWin"
APPLICATIONNAME="openWin"
SHOWINTASKBAR="no"
SINGLEINSTANCE="yes"
WINDOWSTATE="minimize">
<script>
param = "width=330,height=500, scrollbars=0, top="
param += ((screen.availHeight/2)-(665/2))
param += ",left="
param += ((screen.availWidth/2)-(375/2))
window.open('http://www.vintage-limo.com/ipixtours/stretch.html',
'Ipix1', param);</script>
</HEAD>
<BODY onLoad="close();"></BODY>
</HTML>

Save this with a file name like this "wopen.hta".

In your Flash projector call it like this :
fscommand("exec", "start\twopen.hta"); // Win95/98/ME
fscommand("exec", "cmd\t/c\twopen.hta"); // WinNT/2000


Hope it will help...



--
André V.

* Labor omnia vincit improbus

rcochran
01-19-2002, 07:19 PM
That sounds very promising... however, I've already shipped the CD... I'll give it a try and see how it works. Maybe I can use it on the next one.

Thanks for your reply - much appreciated!

-Randy